Module: Cms::Behaviors::Userstamping::InstanceMethods

Defined in:
lib/cms/behaviors/userstamping.rb

Instance Method Summary collapse

Instance Method Details

#set_userstampsObject



28
29
30
31
32
33
34
35
# File 'lib/cms/behaviors/userstamping.rb', line 28

def set_userstamps
  current_user = Cms::User.current ? Cms::User.current : nil
  if new_record?
    self.created_by = current_user
  end
  self.updated_by = current_user

end