Class: Spree::Admin::RefundsController
- Inherits:
-
ResourceController
- Object
- BaseController
- BaseController
- ResourceController
- Spree::Admin::RefundsController
- Defined in:
- app/controllers/spree/admin/refunds_controller.rb
Instance Method Summary collapse
Methods inherited from ResourceController
belongs_to, #destroy, #edit, #new, #update, #update_positions
Methods included from SetsUserLanguageLocaleKey
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/spree/admin/refunds_controller.rb', line 13 def create @refund.attributes = refund_params if @refund.valid? && @refund.perform! flash[:success] = (@refund, :successfully_created) respond_with(@refund) do |format| format.html { redirect_to location_after_save } end else flash.now[:error] = @refund.errors..join(", ") respond_with(@refund) do |format| format.html { render action: 'new' } end end end |