Add method to confirmable to improve flexibility on changing emails #2187

wants to merge 2 commits into


None yet

2 participants


I use an overridden confirmations_controller to get users to pay via cc or paypal when they sign up. If they then try to change their email or password they are asked to pay again.

I added confirm_changed_by_token to confirmable.rb to allow devise:confirmable to respond differently to already confirmed accounts.

Could be useful more generally if for example users have to fill in some info when confirming, you don't want that to happen if they just change their email.

sopwithpup added some commits Dec 21, 2012
@sopwithpup sopwithpup Update lib/devise/models/confirmable.rb
 I added this as I am overriding confirmable to allow subscribed users to subscribe 
via paypal or cc. If they then change their email, the default confirmable expects them to 
pay again!
@sopwithpup sopwithpup Update lib/devise/models/confirmable.rb 9267739
Plataformatec member

Thank you for the pull request. Maybe this method should be called find_for_confirmation and then the other method in that module should just rely on it? We also need tests.

Plataformatec member

Please let us know if there is still an interest into merging this in. CLosing for now, thanks!

@josevalim josevalim closed this Jan 11, 2013

Will do, just a bit busy with work! Will post when done


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