Module: SimpleSlug::ModelAddition::InstanceHistoryMethods
- Defined in:
- lib/simple_slug/model_addition.rb
Instance Method Summary collapse
- #simple_slug_cleanup_history ⇒ Object
- #simple_slug_reset ⇒ Object
- #simple_slug_save_history ⇒ Object
Instance Method Details
#simple_slug_cleanup_history ⇒ Object
80 81 82 |
# File 'lib/simple_slug/model_addition.rb', line 80 def simple_slug_cleanup_history ::SimpleSlug::HistorySlug.where(sluggable_type: self.class.name, sluggable_id: id).delete_all end |
#simple_slug_reset ⇒ Object
76 77 78 |
# File 'lib/simple_slug/model_addition.rb', line 76 def simple_slug_reset errors.blank? || simple_slug_adapter.reset(self) end |
#simple_slug_save_history ⇒ Object
84 85 86 |
# File 'lib/simple_slug/model_addition.rb', line 84 def simple_slug_save_history simple_slug_adapter.save_history(self) end |