I have some images connected with some db settings in my app. I want to get all the images from DB into two different section, one for screenshots and one for wallpapers. In the db, each image has an attribute image_type which defines which one it is. So I thought to put this code into the view: <% @game.images.each do |screenshot| %> <% @game.images.each do |wallpaper| %> After some research, I found out that I didn''t actually understand what I was doing at the time. So how can I do it (properly and not noobish like I did here) and get two separate sections with each getting a bunch of images of a certain type??? Thx a lot -Jake -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---