开发者

Rhodes mobile: How to get the current action?

开发者 https://www.devze.com 2023-03-17 12:25 出处:网络
I\'m creating a pagination partial here, and I would like it to work from any controller/action. I\'m trying something like: url_for(:query => {:page => 2}) for example.

I'm creating a pagination partial here, and I would like it to work from any controller/action.

I'm trying something like: url_for(:query => {:page => 2}) for example. it works, but it redirects for the controller_root?page=2 I need it be controller_root/current_action?page=2

I tryed url_for(:开发者_Go百科action => action_name, :query => ...) but it didn't work. is there any method that returns the current action?


ok, i found it at @request['action']

0

精彩评论

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