Class: Spree::Admin::ImageSettingsController
Instance Attribute Summary
#title
Instance Method Summary
collapse
#access_forbidden, included
Instance Method Details
#edit ⇒ Object
9
10
11
12
|
# File 'app/controllers/spree/admin/image_settings_controller.rb', line 9
def edit
@styles = ActiveSupport::JSON.decode(Spree::Config[:attachment_styles])
@headers = ActiveSupport::JSON.decode(Spree::Config[:s3_headers])
end
|
#show ⇒ Object
4
5
6
7
|
# File 'app/controllers/spree/admin/image_settings_controller.rb', line 4
def show
styles = ActiveSupport::JSON.decode(Spree::Config[:attachment_styles])
@styles_list = styles.collect { |k, v| k }.join(", ")
end
|
#update ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'app/controllers/spree/admin/image_settings_controller.rb', line 14
def update
update_styles(params)
(params) if Spree::Config[:use_s3]
Spree::Config.set(params[:preferences])
update_paperclip_settings
respond_to do |format|
format.html {
flash[:notice] = t(:image_settings_updated)
redirect_to admin_image_settings_path
}
end
end
|