Module: Sherpa::UserstampBasic::ClassMethods

Defined in:
lib/stampable.rb

Instance Method Summary collapse

Instance Method Details

#stampableObject



13
14
15
16
17
18
19
20
# File 'lib/stampable.rb', line 13

def stampable
  class_eval do
    before_save :set_updated_by
    before_create :set_created_by
    belongs_to :created_by, :class_name => "User"
    belongs_to :updated_by, :class_name => "User"
  end
end