Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (10 sloc) 273 Bytes
class UserActionObserver < ActiveRecord::Observer
observe User, Page, Layout, Snippet
cattr_accessor :current_user
def before_create(model)
model.created_by = @@current_user
end
def before_update(model)
model.updated_by = @@current_user
end
end
Jump to Line
Something went wrong with that request. Please try again.