Sha256: dfe20431fa6a2a3617cc0ec4a4c2a1a4dd3bde263cbc6fa621cf19a4f38f3634

Contents?: true

Size: 539 Bytes

Versions: 6

Compression:

Stored size: 539 Bytes

Contents

class Spree::Admin::CorreiosShippingSettingsController < Spree::Admin::BaseController
  def edit
    @preferences = [:id_correios, :password_correios, :services, :default_item_weight, :max_shipping_weight, :split_shipments]
    @config = Spree::CorreiosShippingConfiguration.new
  end

  def update
    config = Spree::CorreiosShippingConfiguration.new

    params.each do |name, value|
      next unless config.has_preference? name
      config[name] = value
    end

    redirect_to edit_admin_correios_shipping_settings_path
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spree_correios_shipping-1.1.4 app/controllers/spree/admin/correios_shipping_settings_controller.rb
spree_correios_shipping-1.1.3 app/controllers/spree/admin/correios_shipping_settings_controller.rb
spree_correios_shipping-1.1.2 app/controllers/spree/admin/correios_shipping_settings_controller.rb
spree_correios_shipping-1.1.1 app/controllers/spree/admin/correios_shipping_settings_controller.rb
spree_correios_shipping-1.1.0 app/controllers/spree/admin/correios_shipping_settings_controller.rb
spree_correios_shipping-1.0.0 app/controllers/spree/admin/correios_shipping_settings_controller.rb