Sha256: 6af1849cedca9b49ef8c8ffcf5961929658593f0450be1edb5b06006c36e3074
Contents?: true
Size: 877 Bytes
Versions: 6
Compression:
Stored size: 877 Bytes
Contents
module Spree module Admin class GeneralSettingsController < Spree::Admin::BaseController include Spree::Backend::Callbacks before_action :set_store def edit end def update if @store.update_attributes(store_params) flash[:success] = Spree.t(:successfully_updated, resource: Spree.t(:general_settings)) redirect_to edit_admin_general_settings_path else render :edit end end def clear_cache Rails.cache.clear invoke_callbacks(:clear_cache, :after) head :no_content end private def store_params params.require(:store).permit(permitted_params) end def permitted_params Spree::PermittedAttributes.store_attributes end def set_store @store = current_store end end end end
Version data entries
6 entries across 6 versions & 1 rubygems