开发者

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜