Module: BestBoy::Eventable::ClassMethods
- Defined in:
- lib/best_boy/eventable.rb
Instance Attribute Summary collapse
-
#best_boy_disable_callbacks ⇒ Object
Returns the value of attribute best_boy_disable_callbacks.
Instance Method Summary collapse
Instance Attribute Details
#best_boy_disable_callbacks ⇒ Object
Returns the value of attribute best_boy_disable_callbacks.
7 8 9 |
# File 'lib/best_boy/eventable.rb', line 7 def best_boy_disable_callbacks @best_boy_disable_callbacks end |
Instance Method Details
#has_a_best_boy(options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/best_boy/eventable.rb', line 9 def has_a_best_boy(={}) # constants # # self.best_boy_disable_callbacks = [:disable_callbacks] # associations # # has_many :best_boy_events, as: :owner, class_name: "BestBoy::Event", dependent: :nullify # callbacks # # after_create :trigger_best_boy_create_event after_destroy :trigger_best_boy_destroy_event end |