Method: Effective::CrudController::Submits::ClassMethods#_insert_on
- Defined in:
- app/controllers/concerns/effective/crud_controller/submits.rb
#_insert_on(action, args = {}) ⇒ Object
107 108 109 110 111 112 113 114 115 116 117 |
# File 'app/controllers/concerns/effective/crud_controller/submits.rb', line 107 def _insert_on(action, args = {}) raise 'expected args to be a Hash' unless args.kind_of?(Hash) if args.key?(:redirect_to) # Normalize this option to redirect args[:redirect] = args.delete(:redirect_to) end args[:action] = action (ons[action] ||= {}).merge!(args) end |