Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在这里创建了一个分页部分,我希望它可以从任何控制器/动作中工作。
我正在尝试类似: url_for(:query => {:page => 2}) 例如。它有效,但它重定向到 controller_root?page=2 我需要它是 controller_root/current_action?page=2
我尝试了 url_for(:action => action_name, :query => ...) 但它没有用。有没有返回当前操作的方法?
好的,我在@request['action']
@request['action']