Hi,
I really don''t understand :
In a partial, I have a collection "@users", in wich I included
"calls" : User.all(:include => :calls") in my controller.
So, in the partial, I have something like :
<% @users.calls.each{|call|%>
<%=h call.from %>
<% } %>
And the error is that i can''t get nil.from.
How a this could be nil ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Craig Demyanovich
2008-Oct-20 15:53 UTC
Re: @collection.each{|item| ...} => item = nil ???
If you rename the call variable in your block to, say, phone_call, does that make a difference? I can''t find call on the reserved word list for Ruby or Rails, but I wonder if it''s just somehow problematic to use it. Regards, Craig --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
No, the problem is out of there... thank you for the idea ! On Oct 20, 11:53 am, "Craig Demyanovich" <cdemyanov...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> If you rename the call variable in your block to, say, phone_call, does that > make a difference? I can''t find call on the reserved word list for Ruby or > Rails, but I wonder if it''s just somehow problematic to use it. > > Regards, > Craig--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---