Skip to content

Instantly share code, notes, and snippets.

@johno
Last active December 21, 2015 02:49
Show Gist options
  • Save johno/6238104 to your computer and use it in GitHub Desktop.
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.
$ ->
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