0

I am using Devise gem and I want to change the redirect path after sending reset password instructions path and I don't want to override the devise controller instead of that I want to use monkey patching helper.

Thanks.

urjit on rails
  • 1,763
  • 4
  • 19
  • 36
  • Can you explain why you would want to take this approach? And actually, it's not clear to me that monkey patching and overriding are actually different in this case. – Tom Harrison Mar 21 '12 at 13:29
  • Thanks for your reply actually from [this](http://stackoverflow.com/questions/4783604/overriding-devises-registration-controller-to-allow-for-a-redirect-after-a-suc) i came to know what is monkey patching and i want to use it.you can find it in above link in first answer. – urjit on rails Mar 21 '12 at 13:40

1 Answers1

1

There are several how-to articles on the Devise Wiki that may provide straightforward solutions to the problem you're trying to solve. One might be here: https://github.com/plataformatec/devise/wiki/How-To:-Change-the-default-sign_in-and-sign_out-routes, and another here: https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-on-successful-sign-in-out

Note that Devise has gone through a lot of changes recently (new version 2.0 is out) that addresses many of the challenges earlier adopters had through better documentation and by exposing hooks that weren't readily available before. I urge you to consider using the new version. My team dealt with many frustrations and difficulties with the earlier version, and we quickly learned that messing with the internals of Devise frequently had unintended consequences. It's a really great gem, especially its OAuth integration, but it does a lot, and has very clear opinions on how to do things.

Tom Harrison
  • 13,533
  • 3
  • 49
  • 77
  • Thanks for your answer but I already seen that link that you send me. I want to redirect after sending reset password instruction not sing in or sign out.Please help me in this. – urjit on rails Mar 21 '12 at 14:11
  • I was hoping you could generalize from the examples provided and that the advise to avoid the solution you linked to would be helpful. I guess not. Sorry I wasn't able to solve your problem :-( – Tom Harrison Mar 21 '12 at 14:15