Ok yeah get it. 

Another issue that I have had is the following: 

In the users/show.html.erb I'm using the following lines: 

  <% @photos.each do |product| %>

                      <%= @photo.user_id %>

                  <% end %>

In the user controller I have declare this : photos = Photo.order(:title), 
but the browser gives me this error: 

undefined method `each' for nil:NilClass in the following line ->  <% 
@photos.each do |product| %>

Could you please tell me what I'm doing wrong?. 

Thank you and best regards.


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/09c80a52-bc93-49e2-a23b-98b24b01d0d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to