search for: updated_by_user_id

Displaying 1 result from an estimated 1 matches for "updated_by_user_id".

2006 Jan 16
16
acts_as_authenticated current_user in a model?
...s Setting < ActiveRecord::Base before_create :created_by_user # create only before_save :updated_by_user # both, create and update def created_by_user self.created_by_user_id = current_user.id self.created_by_user_login = current_user.login end def updated_by_user self.updated_by_user_id = current_user.id self.updated_by_user_login = current_user.login end end ********************************************************** But it gives me this error: ********************************************************** undefined local variable or method `current_user'' for #<Se...