简体   繁体   中英

How do i use link_to in order to link to an index controller but listing only those objects with a specific attribute?

如何使用link_to链接到索引控制器,但仅列出具有特定属性的那些对象?

link_to 'Widgets', widgets_path, :some_attr => 'meep'

Then, in WidgetsController#index, find_by_some_attr(params['some_attr']).

Of course, if you ask a more specific question you might get a more specific answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM