Ruby on Rails: just upgraded to rails 3. some of my links don't work
the link开发者_StackOverflow社区:
<li><%= link_to "Map", :controller => :info, :action => :map %></li>
routes:
resources :link_pages
resources :services
resource :user_session
resource :account, :controller => "users"
resources :password_resets
resources :users
resources :addresses
resources :info
match "/home", :to => 'info#home'
match "/register", :to => 'users#new'
root :to => 'info#home'
but when I click "Map", it thinks I want to go to info#show =\
match ':controller(/:action(/:id(.:format)))'
Try <%= link_to "Map", {:controller => :info, :action => :map} %>
(notice the Hash)
精彩评论