Hi,

Few things here:
1. Would be good if you can paste full code from the beginning of the loop 
till the place where you render picture
2. It is not a good practice to set instance variables in the views, set 
them in controller instead
3. It is not a good practice to do finds in views, if you want to fetch a 
picture for the user, it's better to define a relationship between picture 
and user models. And then do something like this in the controller - @users 
= User.includes(:picture).all

Hope this helps.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/zIp7YSc9B_MJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to