Callbacks with parameters


#1

Hello.

I need to pass a user_id that I have in a session var to a before_save
callback. Is it possible?

Thanks


#2

Pedro C. wrote:

I need to pass a user_id that I have in a session var to a before_save
callback. Is it possible?

Best way would be to add a user_id attr_accessor to the model,
and to set and access that.


We develop, watch us RoR, in numbers too big to ignore.


#3

Thanks… I will do just that…