Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilbert Roulot <groulot@gitlab.com>2018-11-02 18:35:25 +0300
committerVictor Zagorodny <vzagorodny@gitlab.com>2019-02-05 14:14:53 +0300
commit87f299b5d68a398f582fc5a2b65adecb22e9110d (patch)
tree3897fe94f5cde5821f98cec31cb84fe4eeabe30a /app/controllers/profiles
parent55cb4bc9cafca0c838192b54f9daa4b2bc0b86b0 (diff)
Make parameters list more easily changeable
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r--app/controllers/profiles/preferences_controller.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/app/controllers/profiles/preferences_controller.rb b/app/controllers/profiles/preferences_controller.rb
index 37ac11dc6a1..a27e3cceaeb 100644
--- a/app/controllers/profiles/preferences_controller.rb
+++ b/app/controllers/profiles/preferences_controller.rb
@@ -33,12 +33,10 @@ class Profiles::PreferencesController < Profiles::ApplicationController
end
def preferences_params
- params.require(:user).permit(
- :color_scheme_id,
- :layout,
- :dashboard,
- :project_view,
- :theme_id
- )
+ params.require(:user).permit(preferences_param_names)
+ end
+
+ def preferences_param_names
+ [:color_scheme_id, :layout, :dashboard, :project_view, :theme_id]
end
end