diff options
author | P.S.V.R <pmq2001@gmail.com> | 2016-04-18 16:27:51 +0800 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-01-16 23:28:44 -0500 |
commit | 632d22acf765339a35e4552b43e680398bddbf65 (patch) | |
tree | 1f668b83f769c8bddbb767144fe18a7d7441068a | |
parent | 78d710388fbabe27481c77cc353610904465c4df (diff) | |
download | gitlab-ce-pmq20/gitlab-ce-psvr/persisted.tar.gz |
Mark Commit persistedpmq20/gitlab-ce-psvr/persisted
Signed-off-by: Rémy Coutable <remy@rymai.me>
-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 |