Project

General

Profile

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