Sha256: 5d8a452ca6e126f4c79354c84621d8c092a122bda74dc75bf9552595fd9f29b4
Contents?: true
Size: 621 Bytes
Versions: 57
Compression:
Stored size: 621 Bytes
Contents
module Spree module Admin class ReturnAuthorizationsController < ResourceController belongs_to 'spree/order', :find_by => :number update.after :associate_inventory_units create.after :associate_inventory_units def fire @return_authorization.send("#{params[:e]}!") flash[:success] = Spree.t(:return_authorization_updated) 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 end end
Version data entries
57 entries across 57 versions & 1 rubygems