Module: WiserTrails::Deactivatable::ClassMethods
- Defined in:
- lib/wiser_trails/roles/deactivatable.rb
Overview
Provides global methods to disable or enable WiserTrails on a per-class basis.
Instance Method Summary collapse
- #set_wiser_trails_class_defaults ⇒ Object private
-
#wiser_trails_off ⇒ Object
Switches wiser_trails off for this class.
-
#wiser_trails_on ⇒ Object
Switches wiser_trails on for this class.
Instance Method Details
#set_wiser_trails_class_defaults ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 39 |
# File 'lib/wiser_trails/roles/deactivatable.rb', line 36 def set_wiser_trails_class_defaults super self.wiser_trails_enabled_for_model = true end |
#wiser_trails_off ⇒ Object
Switches wiser_trails off for this class
25 26 27 |
# File 'lib/wiser_trails/roles/deactivatable.rb', line 25 def wiser_trails_off self.wiser_trails_enabled_for_model = false end |
#wiser_trails_on ⇒ Object
Switches wiser_trails on for this class
30 31 32 |
# File 'lib/wiser_trails/roles/deactivatable.rb', line 30 def wiser_trails_on self.wiser_trails_enabled_for_model = true end |