route index for a resource
What is the equivalent index path for resources :topics if I were to write it out manually?
When I run rake routes with the resources line in t开发者_开发技巧he routes.rb file it shows. GET /topics(.:format) {:action=>"index", :controller=>"topics"}
I have tried a few things with no success, for example:
get 'topics/index' #=> 'topics#index'
as the route says:
get "/topics" => "topics#index", :as => :topics
you can now use topics_path or topics_url
精彩评论