Understanding the Proc statement from my model class

42 views
Skip to first unread message

fugee ohu

unread,
Apr 6, 2016, 4:22:00 PM4/6/16
to Public Activity
  tracked owner: [:create], owner: Proc.new{ |controller, model| controller.current_user }

I'm trying to understand this familiar line of public activity code in my trackable model Here we declare that the Proc should expect 2 input variables controller and model, we then perform the operation on controller but don't use the model variable Actually it's not much of an operation we're performing on controller So then the result's gonna be that the tracked owner is the current_user at the time of creation of the "row" Can someone please clarify this is so hazy to me
Reply all
Reply to author
Forward
0 new messages