diff --git a/app/controllers/settings/flavours_controller.rb b/app/controllers/settings/flavours_controller.rb index 865d5a47924..a4bdcdf3e32 100644 --- a/app/controllers/settings/flavours_controller.rb +++ b/app/controllers/settings/flavours_controller.rb @@ -16,7 +16,7 @@ class Settings::FlavoursController < Settings::BaseController end def update - user_settings.update(user_settings_params(params[:flavour]).to_h) + user_settings.update(user_settings_params(params[:flavour])) redirect_to action: 'show', flavour: params[:flavour] end @@ -27,9 +27,8 @@ class Settings::FlavoursController < Settings::BaseController end def user_settings_params(flavour) - params.require(:user).merge({ setting_flavour: flavour }).permit( - :setting_flavour, - :setting_skin - ) + { setting_flavour: params.require(:flavour), + setting_skin: params.dig(:user, :setting_skin) + }.with_indifferent_access end end