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:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-19 01:01:42 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-19 01:01:42 +0300
commit4f1c63683175fa88ca41ba2180b68e266d7118e4 (patch)
tree641c40a4e8893fb97053971beac603ae85c1711a /app/controllers/projects/pipelines_controller.rb
parentef60b8e1685a8761477e822b3190a3a0cf4b0cfa (diff)
Create pipeline objects with parameters
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r--app/controllers/projects/pipelines_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb
index 1282913d981..b36081205d8 100644
--- a/app/controllers/projects/pipelines_controller.rb
+++ b/app/controllers/projects/pipelines_controller.rb
@@ -15,7 +15,7 @@ class Projects::PipelinesController < Projects::ApplicationController
end
def new
- @pipeline = project.ci_commits.new
+ @pipeline = project.ci_commits.new(ref: @project.default_branch)
end
def create
@@ -46,7 +46,7 @@ class Projects::PipelinesController < Projects::ApplicationController
private
def create_params
- params.permit(:ref)
+ params.require(:pipeline).permit(:ref)
end
def pipeline