root/lib/rails_addons.rb @ 7b2b192f
b689e231 | Marc Dequènes (Duck) | class ActiveRecord::Base
|
|
# pagination
|
|||
def self.per_page
|
|||
50
|
|||
end
|
|||
# who did the modification ?
|
|||
before_create do |record|
|
|||
record.created_by = SharedStore.instance[:user].uid if record.has_attribute? :created_by
|
|||
end
|
|||
before_update do |record|
|
|||
record.updated_by = SharedStore.instance[:user].uid if record.has_attribute? :updated_by
|
|||
end
|
|||
end
|