Module: Mongoid::Userstamps::Updated

Extended by:
ActiveSupport::Concern
Included in:
Mongoid::Userstamps
Defined in:
lib/mongoid/userstamps/updated.rb

Instance Method Summary collapse

Instance Method Details

#set_updated_byObject



20
21
22
23
24
# File 'lib/mongoid/userstamps/updated.rb', line 20

def set_updated_by
  user = self.class.current_user
  return if !user || public_send("#{userstamps_config.updated_name}_id_changed?")
  public_send("#{userstamps_config.updated_name}=", user)
end