diff --git a/app/controllers/spree/admin/general_settings_controller.rb b/app/controllers/spree/admin/general_settings_controller.rb index 6d2475c8cf..7389ee0890 100644 --- a/app/controllers/spree/admin/general_settings_controller.rb +++ b/app/controllers/spree/admin/general_settings_controller.rb @@ -3,7 +3,7 @@ module Spree class GeneralSettingsController < Spree::Admin::BaseController def edit @preferences_general = [:site_name, :default_seo_title, :default_meta_keywords, - :default_meta_description, :site_url] + :default_meta_description, :site_url, :bugherd_api_key] @preferences_security = [:allow_ssl_in_production, :allow_ssl_in_staging, :allow_ssl_in_development_and_test, :check_for_spree_alerts] diff --git a/app/controllers/spree/admin/general_settings_controller_decorator.rb b/app/controllers/spree/admin/general_settings_controller_decorator.rb deleted file mode 100644 index 7e6c1fc71a..0000000000 --- a/app/controllers/spree/admin/general_settings_controller_decorator.rb +++ /dev/null @@ -1,14 +0,0 @@ -module Spree - module Admin - GeneralSettingsController.class_eval do - end - - module GeneralSettingsEditPreferences - def edit - super - @preferences_general << :bugherd_api_key - end - end - GeneralSettingsController.prepend(GeneralSettingsEditPreferences) - end -end diff --git a/app/controllers/spree/admin/image_settings_controller.rb b/app/controllers/spree/admin/image_settings_controller.rb index da7b8ce4f9..32aae5c783 100644 --- a/app/controllers/spree/admin/image_settings_controller.rb +++ b/app/controllers/spree/admin/image_settings_controller.rb @@ -68,6 +68,11 @@ module Spree Spree::Config[:attachment_default_url] Spree::Image.attachment_definitions[:attachment][:default_style] = Spree::Config[:attachment_default_style] + + # Spree stores attachent definitions in JSON. This converts the style name and format to + # strings. However, when paperclip encounters these, it doesn't recognise the format. + # Here we solve that problem by converting format and style name to symbols. + Spree::Image.reformat_styles end end end diff --git a/app/controllers/spree/admin/image_settings_controller_decorator.rb b/app/controllers/spree/admin/image_settings_controller_decorator.rb deleted file mode 100644 index 5fe7dae551..0000000000 --- a/app/controllers/spree/admin/image_settings_controller_decorator.rb +++ /dev/null @@ -1,11 +0,0 @@ -Spree::Admin::ImageSettingsController.class_eval do - # Spree stores attachent definitions in JSON. This converts the style name and format to - # strings. However, when paperclip encounters these, it doesn't recognise the format. - # Here we solve that problem by converting format and style name to symbols. - def update_paperclip_settings_with_format_styles - update_paperclip_settings_without_format_styles - Spree::Image.reformat_styles - end - - alias_method_chain :update_paperclip_settings, :format_styles -end