Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User concern: Ensure fallback is in place #564

Merged
merged 1 commit into from
May 30, 2016

Conversation

olleolleolle
Copy link
Contributor

Without this change "redirect_url" may be blank, leading to an internal bad URI error unless set when confirming.

Occurs when creating a user from the Rails console, for instance.

Workaround: implement the #send_confirmation_instructions method in your User model, with the opts[:redirect_url] ||= DeviseTokenAuth.default_confirm_success_url line in there.

@booleanbetrayal
Copy link
Collaborator

Looks sane to me @olleolleolle . Could you please fix the tests in an amended commit?

@olleolleolle olleolleolle force-pushed the patch-2 branch 2 times, most recently from e7675f1 to d2e031d Compare March 15, 2016 08:53
@olleolleolle
Copy link
Contributor Author

The tests failed because the fixes to the regexps that had been introduced in the "normal User model" section of the file were not shared to the "alt User model" section.

I'm weak on the style of minitest methods, but perhaps a shared method token_and_redirect_url_from(body) would help?

    Without this change redirect_url may be blank, leading to an internal bad URI error unless set when confirming.

    Occurs when creating a user from the Rails console, for instance.
@olleolleolle
Copy link
Contributor Author

Now, with a shared test method.

@olleolleolle
Copy link
Contributor Author

@booleanbetrayal Rereview?

@booleanbetrayal
Copy link
Collaborator

thanks @olleolleolle and sorry for the delay!

@booleanbetrayal booleanbetrayal merged commit dc59e65 into lynndylanhurley:master May 30, 2016
@olleolleolle
Copy link
Contributor Author

Cool! Thanks for building this project! I use it and it does so many things for me. Thanks for brightening my day.

@olleolleolle olleolleolle deleted the patch-2 branch May 31, 2016 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants