Project

General

Profile

Download (363 Bytes) Statistics
| Branch: | Tag: | Revision:
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