Module: ActsAsArchived::ClassMethods
- Defined in:
- app/models/concerns/acts_as_archived.rb
Instance Method Summary collapse
- #acts_as_archived? ⇒ Boolean
- #after_archive(*filters, &blk) ⇒ Object
- #after_unarchive(*filters, &blk) ⇒ Object
-
#before_archive(*filters, &blk) ⇒ Object
before_archive(if: -> { persisted? }).
- #before_unarchive(*filters, &blk) ⇒ Object
Instance Method Details
#acts_as_archived? ⇒ Boolean
84 |
# File 'app/models/concerns/acts_as_archived.rb', line 84 def acts_as_archived?; true; end |
#after_archive(*filters, &blk) ⇒ Object
91 92 93 |
# File 'app/models/concerns/acts_as_archived.rb', line 91 def after_archive(*filters, &blk) set_callback(:archive, :after, *filters, &blk) end |
#after_unarchive(*filters, &blk) ⇒ Object
99 100 101 |
# File 'app/models/concerns/acts_as_archived.rb', line 99 def after_unarchive(*filters, &blk) set_callback(:unarchive, :after, *filters, &blk) end |
#before_archive(*filters, &blk) ⇒ Object
before_archive(if: -> { persisted? })
87 88 89 |
# File 'app/models/concerns/acts_as_archived.rb', line 87 def before_archive(*filters, &blk) set_callback(:archive, :before, *filters, &blk) end |
#before_unarchive(*filters, &blk) ⇒ Object
95 96 97 |
# File 'app/models/concerns/acts_as_archived.rb', line 95 def before_unarchive(*filters, &blk) set_callback(:unarchive, :before, *filters, &blk) end |