activerecord - Pass custom argument to rails event model callbacks? -
very simple question unable figure out. possible like:
after_create :log_activity(my_var)
so write 1 method handles actions ( destroy,save,update)?
no, not possible pass variables callback method. reason simple callback methods called rails stack , when call callback method, did't know pass in callback method.
Comments
Post a Comment