Module: Spree::Admin::Callbacks::ClassMethods
- Defined in:
- lib/spree/admin/callbacks.rb
Instance Attribute Summary collapse
-
#callbacks ⇒ Object
Returns the value of attribute callbacks.
Instance Method Summary collapse
- #create ⇒ Object
- #custom_callback(action) ⇒ Object
- #destroy ⇒ Object
- #edit_action ⇒ Object
- #new_action ⇒ Object
- #update ⇒ Object
Instance Attribute Details
#callbacks ⇒ Object
Returns the value of attribute callbacks.
9 10 11 |
# File 'lib/spree/admin/callbacks.rb', line 9 def callbacks @callbacks end |
Instance Method Details
#create ⇒ Object
19 20 21 |
# File 'lib/spree/admin/callbacks.rb', line 19 def create custom_callback(:create) end |
#custom_callback(action) ⇒ Object
31 32 33 34 |
# File 'lib/spree/admin/callbacks.rb', line 31 def custom_callback(action) @callbacks ||= {} @callbacks[action] ||= Spree::Admin::ActionCallbacks.new end |
#destroy ⇒ Object
27 28 29 |
# File 'lib/spree/admin/callbacks.rb', line 27 def destroy custom_callback(:destroy) end |
#edit_action ⇒ Object
15 16 17 |
# File 'lib/spree/admin/callbacks.rb', line 15 def edit_action custom_callback(:edit_action) end |
#new_action ⇒ Object
11 12 13 |
# File 'lib/spree/admin/callbacks.rb', line 11 def new_action custom_callback(:new_action) end |
#update ⇒ Object
23 24 25 |
# File 'lib/spree/admin/callbacks.rb', line 23 def update custom_callback(:update) end |