With rails 2.2.2 this code :
<%= render :partial => ''order'', :collections =>
@orders %>
with partial _order.html.erb :
<% div_for order do %>
<%= order.title %><br/>
<% end %>
Called id for nil, which would mistakenly be 4 -- if you really wanted
the id of nil, use object_id
while this peace of code work fine :
<% @orders.each do |order| %>
<%= render :partial => ''order'', :locals => { :order
=> order } %>
<% end %>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---
Mislav Marohnić
2009-Jan-08 16:09 UTC
Re: render :partial :collections failed with rails 2.2.2
On Thu, Jan 8, 2009 at 17:05, Joel Azemar <joel.azemar@gmail.com> wrote:> > With rails 2.2.2 this code : > > <%= render :partial => ''order'', :collections => @orders %>It''s "collection" (singular), not "collections". http://api.rubyonrails.org/classes/ActionController/Base.html#M000512 Please use Lighthouse tracker for bug reports in the future. Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Joel Azemar
2009-Jan-08 16:40 UTC
Re: render :partial :collections failed with rails 2.2.2
Oootch !!! my greatest apologies ... On 8 jan, 17:09, "Mislav Marohnić" <mislav.maroh...@gmail.com> wrote:> On Thu, Jan 8, 2009 at 17:05, Joel Azemar <joel.aze...@gmail.com> wrote: > > > With rails 2.2.2 this code : > > > <%= render :partial => ''order'', :collections => @orders %> > > It''s "collection" (singular), not "collections".http://api.rubyonrails.org/classes/ActionController/Base.html#M000512 > > Please use Lighthouse tracker for bug reports in the future. Thanks--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---