hello, For school i''m making a website for music cd''s I''m a beginner with RoR so I run into problems. At the moment I made 2 mysql tables, one with Genres and one with CD''s when I click on the genre -> show, then i''ll get the CD''s of that genre But when I want to show all the cd''s I got in my database I''m running into problems. Cause i''ve linked all cd''s with a genre he needs an ID of a genre to link cd''s So I can''t link all the cd''s I wanted to know if people know how to fix this problem -- 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 -~----------~----~----~----~------~----~------~--~---
you just need to add an action show_all to your controller. @cds = Cds.find(:all) more is hard to tell from what information you are giving. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ok, a little bit more detail, You have cd''s Every cd has a genre and an artist You want 3 differente queries 1: a list of all the Cd''s with a link where you can add new Cd''s 2: @ genre, you can select a genre and get a list of all the cd''s with that genre 3: @ artist, you can select an artist and get a list of all the cd''s of that artist. Hope this helps abit :) A search querie would be nice aswell, that you search on an artist and get all the cd''s of that artist, but thats for later on :) Thnx for replying already MaD -- 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 -~----------~----~----~----~------~----~------~--~---