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" %>