diff options
author | P.S.V.R <pmq2001@gmail.com> | 2016-04-18 11:27:51 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-01-17 07:28:44 +0300 |
commit | 632d22acf765339a35e4552b43e680398bddbf65 (patch) | |
tree | 1f668b83f769c8bddbb767144fe18a7d7441068a /app | |
parent | 78d710388fbabe27481c77cc353610904465c4df (diff) |
Mark Commit persisted
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app')
-rw-r--r-- | app/models/commit.rb | 8 | ||||
-rw-r--r-- | app/views/projects/commit/_change.html.haml | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 0b924b063a4..3365f4ffdbf 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -318,6 +318,14 @@ class Commit Gitlab::Diff::FileCollection::Commit.new(self, diff_options: diff_options) end + def persisted? + true + end + + def touch + # no-op but needs to be defined since #persisted? is defined + end + private def commit_reference(from_project, referable_commit_id, full: false) diff --git a/app/views/projects/commit/_change.html.haml b/app/views/projects/commit/_change.html.haml index 12e4280d344..990908211de 100644 --- a/app/views/projects/commit/_change.html.haml +++ b/app/views/projects/commit/_change.html.haml @@ -13,7 +13,7 @@ %a.close{ href: "#", "data-dismiss" => "modal" } × %h3.page-title== #{label} this #{commit.change_type_title(current_user)} .modal-body - = form_tag send("#{type.underscore}_namespace_project_commit_path", @project.namespace, @project, commit.id), method: :post, remote: false, class: "form-horizontal js-#{type}-form js-requires-input" do + = form_tag [type.underscore, @project.namespace, @project, commit], method: :post, remote: false, class: "form-horizontal js-#{type}-form js-requires-input" do .form-group.branch = label_tag 'target_branch', target_label, class: 'control-label' .col-sm-10 |