Let's say in my rails controller I have a method set_one()that is called through before_filter. Is this method called every time right before the action of the controller, or is it the one time that is executed throughout the controller? If this is one time, then this means that the instance variables that it creates will be available throughout the controller. I thought the actions of the controller are stateless. Does this help bridge the gap if it starts only once before all actions?
def set_one
@one = 1;
end
Thanks in advance.:)
source
share