Class: Admin::GeneralSettingsController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::GeneralSettingsController
- Defined in:
- app/controllers/admin/general_settings_controller.rb
Instance Method Summary collapse
Instance Method Details
#dismiss_alert ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'app/controllers/admin/general_settings_controller.rb', line 21 def dismiss_alert if request.xhr? and params[:alert_id] dismissed = Spree::Config[:dismissed_spree_alerts] || '' Spree::Config.set :dismissed_spree_alerts => dismissed.split(',').push(params[:alert_id]).join(',') filter_dismissed_alerts render :nothing => true end end |
#edit ⇒ Object
8 9 10 11 12 |
# File 'app/controllers/admin/general_settings_controller.rb', line 8 def edit @preferences = ['site_name', 'default_seo_title', 'default_meta_keywords', 'default_meta_description', 'site_url', 'allow_ssl_in_production', 'allow_ssl_in_development_and_test'] end |
#show ⇒ Object
3 4 5 6 |
# File 'app/controllers/admin/general_settings_controller.rb', line 3 def show @preferences = ['site_name', 'default_seo_title', 'default_meta_keywords', 'default_meta_description', 'site_url'] end |
#update ⇒ Object
14 15 16 17 18 19 |
# File 'app/controllers/admin/general_settings_controller.rb', line 14 def update @config = Spree::Config.instance @config.update_attributes(params[@config.class.name.underscore]) Rails.cache.delete("configuration_#{@config.class.name}".to_sym) redirect_to admin_general_settings_path end |