Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/obsidian/rails/model_update_tracker.rb
Overview
not using normal after save hooks because of initialization order issues
Instance Method Summary collapse
- #create_with_model_update_tracker(*args, &blk) ⇒ Object
- #destroy_with_model_destroy_tracker(*args, &blk) ⇒ Object
- #update_with_model_update_tracker(*args, &blk) ⇒ Object
Instance Method Details
#create_with_model_update_tracker(*args, &blk) ⇒ Object
100 101 102 103 104 |
# File 'lib/obsidian/rails/model_update_tracker.rb', line 100 def create_with_model_update_tracker(*args,&blk) result = create_without_model_update_tracker(*args,&blk) Obsidian::Rails::ModelUpdateTracker.after_create(self) if result result end |
#destroy_with_model_destroy_tracker(*args, &blk) ⇒ Object
116 117 118 119 120 |
# File 'lib/obsidian/rails/model_update_tracker.rb', line 116 def destroy_with_model_destroy_tracker(*args,&blk) result = destroy_without_model_destroy_tracker(*args,&blk) Obsidian::Rails::ModelUpdateTracker.after_destroy(self) if result result end |
#update_with_model_update_tracker(*args, &blk) ⇒ Object
108 109 110 111 112 |
# File 'lib/obsidian/rails/model_update_tracker.rb', line 108 def update_with_model_update_tracker(*args,&blk) result = update_without_model_update_tracker(*args,&blk) Obsidian::Rails::ModelUpdateTracker.after_update(self) if result result end |