Class: UserActionObserver
- Inherits:
-
ActiveRecord::Observer
- Object
- ActiveRecord::Observer
- UserActionObserver
- Defined in:
- app/models/user_action_observer.rb
Instance Method Summary collapse
Instance Method Details
#before_create(model) ⇒ Object
6 7 8 |
# File 'app/models/user_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/user_action_observer.rb', line 10 def before_update(model) model.updated_by = @@current_user end |