Class: Spree::Admin::ReturnAuthorizationsController
- Inherits:
-
ResourceController
- Object
- BaseController
- BaseController
- ResourceController
- Spree::Admin::ReturnAuthorizationsController
- Defined in:
- app/controllers/spree/admin/return_authorizations_controller.rb
Instance Method Summary collapse
Methods inherited from ResourceController
belongs_to, #create, #destroy, #edit, #new, #update, #update_positions
Methods included from SetsUserLanguageLocaleKey
Instance Method Details
#fire ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/spree/admin/return_authorizations_controller.rb', line 12 def fire action_from_params = "#{params[:e]}!" if @return_authorization.state_events.include?(params[:e].to_sym) && @return_authorization.send(action_from_params) = { success: t('spree.return_authorization_updated') } else = { error: t('spree.return_authorization_fire_error') } end redirect_back(fallback_location: (@order), flash: ) end |