Class: Spree::Admin::GeneralSettingsController
Instance Attribute Summary
#title
Instance Method Summary
collapse
#access_forbidden, included
Instance Method Details
#dismiss_alert ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'app/controllers/spree/admin/general_settings_controller.rb', line 25
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
9
10
11
12
13
14
|
# File 'app/controllers/spree/admin/general_settings_controller.rb', line 9
def edit
@preferences = [:site_name, :default_seo_title, :default_meta_keywords,
:default_meta_description, :site_url, :allow_ssl_in_production,
:allow_ssl_in_staging, :allow_ssl_in_development_and_test,
:check_for_spree_alerts]
end
|
#show ⇒ Object
4
5
6
7
|
# File 'app/controllers/spree/admin/general_settings_controller.rb', line 4
def show
@preferences = ['site_name', 'default_seo_title', 'default_meta_keywords',
'default_meta_description', 'site_url']
end
|
#update ⇒ Object
16
17
18
19
20
21
22
23
|
# File 'app/controllers/spree/admin/general_settings_controller.rb', line 16
def update
params.each do |name, value|
next unless Spree::Config.has_preference? name
Spree::Config[name] = value
end
redirect_to admin_general_settings_path
end
|