From e2529b174fdcab431c2125a6066c13fb29669ccb Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 7 May 2014 13:25:06 +0800 Subject: [PATCH] edit form fixed --- app/views/admin/page_contents/new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/page_contents/new.html.erb b/app/views/admin/page_contents/new.html.erb index 83b8bec..660e302 100644 --- a/app/views/admin/page_contents/new.html.erb +++ b/app/views/admin/page_contents/new.html.erb @@ -32,7 +32,7 @@
<%= f.hidden_field :page_id, :value=>@page.id.to_s %> - <%= f.hidden_field :version, :value=>(@page.page_contexts.last.version + 1)%> + <%= f.hidden_field :version, :value=>((@page.page_contexts.last.version + 1) rescue 1)%> <%= f.submit t("page_content.save"), :class=> "btn btn-primary bt-form-save" %>