假设路线
map.resources :articles
你怎么得到这个
/articles?most_popular
使用link_to
方法?
尝试了以下方法:
link_to articles_path(:most_popular) # exception
link_to articles_path(:most_popular => nil) # /articles
link_to articles_path(:most_popular => true) # /articles?most_popular=true
注意:我正在使用inherited_resourceshas_scope