Reputation: 11
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?
Upvotes: 1
Views: 956
Reputation: 436
Rails.application.routes.recognize_path(request.referer)[:action]
Upvotes: 5