开发者

How do I access a param passed as 'action', since Rails uses that name internally?

开发者 https://www.devze.com 2023-01-04 10:13 出处:网络
I\'m working on a rails app that integrates with other syste开发者_高级运维ms (which can\'t be changed), and I need to handle the case below:

I'm working on a rails app that integrates with other syste开发者_高级运维ms (which can't be changed), and I need to handle the case below:

A user is redirected to my app with a URL like:

http://myapp.com/index?action=signout

The problem is, I can't access this param through params[:action], since Rails uses that to keep track of the current action.

Is there a way around this?


Nevermind! I can just parse request.url myself, and that'll do it.


If its not passed inside the params hash, then you're probably out of luck. Perhaps it could be somehow remapped with a Metal/Rack app...

0

精彩评论

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

关注公众号