Ah!
Found this video at Railscasts (of course... :) )
http://media.railscasts.com/videos/203_routing_in_rails_3.mov
Regards
Linus
On 19 mar, 17:47, Linus Pettersson
<linus.petters...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi!
>
> I have two models, artists and songs. Each artist has, of course, many
> songs and each song belongs to one artist. Everything is working fine
> but I want to make my urls look a bit different. I''m very new to
Ruby
> and RoR.
>
> Right now my urls looks like this:
> example.com/artists/1 #Listing all of the songs that is related to
> this artist
> example.com/songs/1 #Showing a song
>
> What I want is something like this:
> example.com/music/artist_name/song_name-id
>
> I have tried to find info about this but I don''t really know what
to
> search for.
>
> Best Regards
> Linus
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.