开发者

Finding the calling controller/action in Rails

Like request.referer, I want to know from which controller/action the user is coming from. Is there a method do to this? All I开发者_开发问答 could think of is to use a flash, any better method?


Rails.application.routes.recognize_path(request.referer)[:action]

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜