Added ability to override redirect_to path after sending reset password ... #1750

Merged
merged 2 commits into from Mar 29, 2012

Conversation

Projects
None yet
2 participants

The main purpose of this pull request is to enable behaviour like #1067 for Rails 2.x

I am not very familiar with TestUnit, so please let me know about any problem with tests.

@josevalim josevalim and 1 other commented on an outdated diff Mar 29, 2012

test/integration/recoverable_test.rb
@@ -32,6 +32,12 @@ def reset_password(options={}, &block)
click_button 'Change my password'
end
+ def redefine_after_reset_password_path
+ PasswordsController.send :define_method, :after_sending_reset_password_instructions_path_for do |r_name|
@josevalim

josevalim Mar 29, 2012

Owner

Unfortunately if you do this, you will change the global state which may affect other tests.

We usually don't test such hooks, so feel free to skip the tests.

@0x000000

0x000000 Mar 29, 2012

Jose, thank you for helping! I've skipped my test.

@josevalim josevalim added a commit that referenced this pull request Mar 29, 2012

@josevalim josevalim Merge pull request #1750 from 0x000000/v1.0
Added ability to override redirect_to path after sending reset password ...
f2cd983

@josevalim josevalim merged commit f2cd983 into plataformatec:v1.0 Mar 29, 2012

Owner

josevalim commented Mar 29, 2012

Thanks. However, I won't release a new gem, so please use a git dependency (or update to Rails 3 :D)!

Thank you! We will use git dependency in Gemfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment