Class: Spree::Admin::ImageSettingsController
Instance Method Summary
collapse
included
#current_ability, included, #redirect_back_or_default, #store_location, #try_spree_current_user, #unauthorized
Instance Method Details
#edit ⇒ Object
4
5
6
7
|
# File 'app/controllers/spree/admin/image_settings_controller.rb', line 4
def edit
@styles = ActiveSupport::JSON.decode(Spree::Config[:attachment_styles])
@headers = ActiveSupport::JSON.decode(Spree::Config[:s3_headers])
end
|
#update ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'app/controllers/spree/admin/image_settings_controller.rb', line 9
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[:success] = t(:image_settings_updated)
redirect_to edit_admin_image_settings_path
}
end
end
|