Class: RoleActionObserver

Inherits:
ActiveRecord::Observer
  • Object
show all
Defined in:
app/models/role_action_observer.rb

Instance Method Summary collapse

Instance Method Details

#before_create(model) ⇒ Object



6
7
8
# File 'app/models/role_action_observer.rb', line 6

def before_create(model)
  model.created_by = @@current_user
end

#before_update(model) ⇒ Object



10
11
12
# File 'app/models/role_action_observer.rb', line 10

def before_update(model)
  model.updated_by = @@current_user
end