Skip to content

Commit

Permalink
:new_part must specify @page.new_record? to determine whether this is…
Browse files Browse the repository at this point in the history
… a new record. Issue identified by http://github.com/flats
  • Loading branch information
parndt committed Oct 19, 2009
1 parent dbcfe2a commit 89dbb81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vendor/plugins/pages/app/views/admin/pages/_form.html.erb
Expand Up @@ -29,7 +29,7 @@
<div id='page_part_editors'>
<% part_index = -1 %>
<% f.fields_for :parts do |p| %>
<%= render :partial => "page_part_field", :locals => {:title => p.object.title, :body => p.object.body, :part_index => (part_index += 1), :new_part => false} %>
<%= render :partial => "page_part_field", :locals => {:title => p.object.title, :body => p.object.body, :part_index => (part_index += 1), :new_part => @page.new_record?} %>
<% end %>
</div>
</div>
Expand Down

0 comments on commit 89dbb81

Please sign in to comment.