From 35259a4f48e19a19437be10c02eb8398c108d507 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Thu, 27 Jul 2017 22:00:06 +0900 Subject: Encapsulate the commit.sha logic --- app/views/projects/wikis/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects/wikis/_form.html.haml') diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml index 5c335ba306b..adb8d5aaecb 100644 --- a/app/views/projects/wikis/_form.html.haml +++ b/app/views/projects/wikis/_form.html.haml @@ -5,7 +5,7 @@ = f.hidden_field :title, value: @page.title - if @page.persisted? - = f.hidden_field :last_commit_sha, value: @page.commit.sha + = f.hidden_field :last_commit_sha, value: @page.last_commit_sha .form-group .col-sm-12= f.label :format, class: 'control-label-full-width' .col-sm-12 -- cgit v1.2.1