开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜