【发布时间】:2010-12-21 10:09:21
【问题描述】:
假设路线
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_resources 和 has_scope
【问题讨论】:
标签: ruby-on-rails activeresource link-to-function