edit form fixed

This commit is contained in:
Harry Bomrah 2014-05-07 13:25:06 +08:00
parent f01785443e
commit e2529b174f
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@
</div>
<div class="form-actions">
<%= 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" %>
</div>
</div>