Sha256: 3db0d58493aed8e5ff438a8e28dff2a06f994a35d47cd4267e7eb37a0ed3cf44

Contents?: true

Size: 666 Bytes

Versions: 11

Compression:

Stored size: 666 Bytes

Contents

module Spree
  module Admin
    class GeneralSettingsController < Spree::Admin::BaseController
      include Spree::Backend::Callbacks

      def edit
        @preferences_security = []
      end

      def update
        params.each do |name, value|
          next unless Spree::Config.has_preference? name
          Spree::Config[name] = value
        end

        flash[:success] = Spree.t(:successfully_updated, resource: Spree.t(:general_settings))
        redirect_to edit_admin_general_settings_path
      end

      def clear_cache
        Rails.cache.clear
        invoke_callbacks(:clear_cache, :after)
        head :no_content
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
spree_backend-3.6.6 app/controllers/spree/admin/general_settings_controller.rb
spree_backend-3.6.5 app/controllers/spree/admin/general_settings_controller.rb
spree_backend-3.6.4 app/controllers/spree/admin/general_settings_controller.rb
spree_backend-3.6.3 app/controllers/spree/admin/general_settings_controller.rb
spree_backend-3.6.2 app/controllers/spree/admin/general_settings_controller.rb
spree_backend-3.6.1 app/controllers/spree/admin/general_settings_controller.rb
spree_backend-3.6.0 app/controllers/spree/admin/general_settings_controller.rb
spree_backend-3.5.0 app/controllers/spree/admin/general_settings_controller.rb
spree_backend-3.6.0.rc1 app/controllers/spree/admin/general_settings_controller.rb
spree_backend-3.5.0.rc2 app/controllers/spree/admin/general_settings_controller.rb
spree_backend-3.5.0.rc1 app/controllers/spree/admin/general_settings_controller.rb