Sha256: 56f91f49d4dd6b87799c36ae9957627f090e0ee328b2f30ee96379e3ea13d6d0

Contents?: true

Size: 546 Bytes

Versions: 1

Compression:

Stored size: 546 Bytes

Contents

module Spree
  module Admin
    class SevenSettingsController < ResourceController
      def update
        settings = Spree::SevenSetting.new

        preferences = params&.key?(:preferences) ? params.delete(:preferences) : params
        preferences.each do |name, value|
          next unless settings.has_preference? name
          settings[name] = value
        end

        flash[:success] = Spree.t(:successfully_updated, resource: Spree.t('seven.settings'))

        redirect_to edit_admin_seven_settings_path
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_seven-0.0.1 app/controllers/spree/admin/seven_settings_controller.rb