开发者

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

开发者 https://www.devze.com 2023-02-05 18:15 出处:网络
How do i use link_to in order to link to an index controller but listing only those objects with a specific attribu开发者_如何学Pythonte?link_to \'Widgets\', widgets_path, :some_attr => \'meep\'

How do i use link_to in order to link to an index controller but listing only those objects with a specific attribu开发者_如何学Pythonte?


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.

0

精彩评论

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