I have a typical artist has_many songs model and I'm trying to set up the nested resource in Rails.
My routes.rb looks like this:
map.resources :artists do |artist|
map.resources :songs
end
This works fine for the artist paths, but when I want to link to the songs controller, like this:
<%= link_to artist.name, artist_songs_path(artist) %>
my links look like this:
/songs.<artist:0x22b77ec>
Where it should probably look like /artist/5/songs
I'm sure it's something stupid I've missed, but I don't see it. Ideas?