Refactor authorized params in Admin::GroupsController

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2017-01-10 14:43:06 +01:00
parent dafd5531ed
commit 83c1395af2

View file

@ -61,7 +61,11 @@ class Admin::GroupsController < Admin::ApplicationController
end
def group_params
params.require(:group).permit(
params.require(:group).permit(group_params_ce)
end
def group_params_ce
[
:avatar,
:description,
:lfs_enabled,
@ -69,6 +73,6 @@ class Admin::GroupsController < Admin::ApplicationController
:path,
:request_access_enabled,
:visibility_level
)
]
end
end