Sha256: b11aba6d87572697cd6a9ca69f13f1051482a7dfa78de94c08bd855031744f2d

Contents?: true

Size: 583 Bytes

Versions: 23

Compression:

Stored size: 583 Bytes

Contents

class Admin::ReturnAuthorizationsController < Admin::ResourceController
  belongs_to :order, :find_by => :number

  update.after :associate_inventory_units
  create.after :associate_inventory_units

  def fire
    @return_authorization.send("#{params[:e]}!")
    flash.notice = t('return_authorization_updated')
    respond_with(@return_authorization) { |format| format.html { redirect_to :back } }
  end

  protected
    def associate_inventory_units
      params[:return_quantity].each { |variant_id, qty| @return_authorization.add_variant(variant_id.to_i, qty.to_i) }
    end
end

Version data entries

23 entries across 23 versions & 6 rubygems

Version Path
spree_core-0.70.7 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.70.6 app/controllers/admin/return_authorizations_controller.rb
apispree_core-0.0.0 app/controllers/admin/return_authorizations_controller.rb
My-Commerce_core-1.1.0 app/controllers/admin/return_authorizations_controller.rb
My-Commerce_core-1.0.0 app/controllers/admin/return_authorizations_controller.rb
MyCommerceapi-1.0.0 core/app/controllers/admin/return_authorizations_controller.rb
MyCommerce-0.0.3 core/app/controllers/admin/return_authorizations_controller.rb
rfcommerce_core-0.0.3 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.60.6 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.70.5 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.70.4 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.60.5 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.70.3 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.70.2 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.60.4 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.60.3 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.70.1 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.70.0 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.60.2 app/controllers/admin/return_authorizations_controller.rb
spree_core-0.70.0.rc2 app/controllers/admin/return_authorizations_controller.rb