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

Closed
wants to merge 2 commits into
from

Projects

None yet

2 participants

@sopwithpup

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!
654e60e
@sopwithpup sopwithpup Update lib/devise/models/confirmable.rb 9267739
@josevalim
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.

@sopwithpup
@josevalim
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
@sopwithpup

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

Thanks

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