Ok so this seems easy huh? So I have some images in a db. Some are marked as "screenshots" and others as "wallpapers". Now in various parts of the site, I want to show only "screenshots" and in another area, only "wallpapers". In the db, it''s in the column marked "image_type" Here is what I thought: The view: <% for screenshot in @game.images %> <a href="/images/games/<%= screenshot.id %>-full.<%screenshot.extension %>" rel="lightbox" class="horizontal"><img id="screenshot" width="75" height="75" src="/images/games/<%screenshot.id %>-thumb.<%= screenshot.extension %>" title="<%screenshot.name %>" alt="<%= screenshot.id %>" /></a><% end %> and <% for wallpaper in @game.images %> <a href="/images/games/<%= wallpaper.id %>-full.<%= wallpaper.extension %>"><img id="wallpapers" width="75" height="75" src="/images/games/<%wallpaper.id %>-thumb.<%= wallpaper.extension %>"/></a><% end %> The Models: now I have "belongs_to :games" and "has_many :images" The Controller: @game = Game.find(params[:id]) @images = Image.find(:all) @screenshot = Image.find(:all, :conditions => "image_type ''Screenshots''") @wallpaper = Image.find(:all, :conditions => "image_type ''Wallpapers''") now how do I do it, so that it selects only the images I want? Because instead of selecting the image I want, it selects ALL the images for both. Please help people, I''m so lost........ I think the answer is really easy, but I''m still learning rails, so be kind :p - 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 -~----------~----~----~----~------~----~------~--~---