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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-26 16:00:09 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-26 16:00:09 +0400
commit3a21c904dda9aa9c701675ccc6d1c15b20a745b3 (patch)
treeb67f6e4f95b92fd3f234c70ea119173b01fa2c0d /app/controllers/projects/protected_branches_controller.rb
parent04516027df466747168bd80507aff62e61ac0d2d (diff)
Use strong params for 5 more models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/projects/protected_branches_controller.rb')
-rw-r--r--app/controllers/projects/protected_branches_controller.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/projects/protected_branches_controller.rb b/app/controllers/projects/protected_branches_controller.rb
index e39e97af8dd..bd31b1d3c54 100644
--- a/app/controllers/projects/protected_branches_controller.rb
+++ b/app/controllers/projects/protected_branches_controller.rb
@@ -11,7 +11,7 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
end
def create
- @project.protected_branches.create(params[:protected_branch])
+ @project.protected_branches.create(protected_branch_params)
redirect_to project_protected_branches_path(@project)
end
@@ -23,4 +23,10 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
format.js { render nothing: true }
end
end
+
+ private
+
+ def protected_branch_params
+ params.require(:protected_branch).permit(:name)
+ end
end