diff options
Diffstat (limited to 'app/controllers/concerns/creates_commit.rb')
-rw-r--r-- | app/controllers/concerns/creates_commit.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index b3777fd2b0f..7cdbe068f4d 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -11,7 +11,7 @@ module CreatesCommit @branch_name ||= @ref else @project_to_commit_into = current_user.fork_of(@project) - @branch_name ||= @project_to_commit_into.repository.next_branch('patch') + @branch_name ||= @project_to_commit_into.repository.next_branch("patch") end @start_branch ||= @ref || @branch_name @@ -31,7 +31,7 @@ module CreatesCommit respond_to do |format| format.html { redirect_to success_path } - format.json { render json: { message: "success", filePath: success_path } } + format.json { render json: {message: "success", filePath: success_path} } end else flash[:alert] = result[:message] @@ -45,7 +45,7 @@ module CreatesCommit redirect_to failure_path end end - format.json { render json: { message: "failed", filePath: failure_path } } + format.json { render json: {message: "failed", filePath: failure_path} } end end end @@ -90,7 +90,7 @@ module CreatesCommit source_project_id: @project_to_commit_into.id, target_project_id: @project.id, source_branch: @branch_name, - target_branch: @start_branch + target_branch: @start_branch, } ) end @@ -110,7 +110,8 @@ module CreatesCommit .find_by( source_project_id: @project_to_commit_into, source_branch: @branch_name, - target_branch: @start_branch) + target_branch: @start_branch + ) end end # rubocop: enable CodeReuse/ActiveRecord |