Last active
December 21, 2015 02:49
-
-
Save johno/6238104 to your computer and use it in GitHub Desktop.
Grab devise form content, like an email, and add it as a parameter to populate the next form. This can be rather helpful when a user realizes they forgot their email, now they won't have to retype it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
devise.grabUserEmailToSendAsParam() | |
devise = | |
grabUserEmailToSendAsParam: -> | |
$('.grab-email').on('click', -> | |
if $('#user_email').val().length | |
$(this).attr('href', $(this).attr('href') + "?email=#{ $('#user_email').val() }") ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment