Mark Commit persisted

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
P.S.V.R 2016-04-18 16:27:51 +08:00 committed by Rémy Coutable
parent 78d710388f
commit 632d22acf7
No known key found for this signature in database
GPG key ID: 46DF07E5CD9E96AB
2 changed files with 9 additions and 1 deletions

View file

@ -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)

View file

@ -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