Displaying 1 result from an estimated 1 matches for "tournament_url".
2008 Jan 27
4
(REST) Nested routes
.../1/tournaments/1
so I''ve mapped it in routes.rb:
I''ve tried these two forms:
map.resources :teams, :has_many => [:tournaments]
map.resources :teams do |team|
team.resources :tournaments
end
And I can do http://localhost:3000/teams/1/tournaments/1, but I can''t
use tournament_url(:team_id => @team, :id => @team.leagues[0]) in a
view because I get the error tournament_url is not defined.
What''s wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"...