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

Confirmable - unconfirmed email #58

Closed
ghost opened this issue Oct 29, 2014 · 4 comments
Closed

Confirmable - unconfirmed email #58

ghost opened this issue Oct 29, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Oct 29, 2014

Test A

  1. Added before_create :skip_confirmation! in User model
  2. Disabled the Confirmable columns in the migration file
  3. Ran db:migration

Result of test A
db:migration fails during execution of seed.rb with message:
NameError: undefined local variable or method `confirmed_at' for #User:0x007fabb13dcae8

Test B
4. Enabled the Confirmable columns in the migration file
5. Ran db:migration

Result of test B
Confirmation columns are all updated except unconfirmed_email

Test C
6. Removed `before_create :skip_confirmation!`` in User model
7. Kept the Confirmable columns enabled in the migration file
8. Ran db:migration

Result of test C
Confirmation columns are all updated except unconfirmed_email and confirmed_at

Question 1
Are the Confirmation columns necessary, if before_create :skip_confirmation! is implemented ?

Question 2
Shouldn't unconfirmed_email be set when confirmation is implemented or could this column be omitted ? You already have uid and email columns.

@booleanbetrayal
Copy link
Collaborator

@UrbanViking - In case it helps, I've prevented the use of those columns by overriding the attributes as follows in my User.rb:

    # Force disable confirmation in devise_token_auth

    def confirmed_at 
        DateTime.now
    end
    def confirmed_at=(val)
    end

    def unconfirmed_email 
        self.email
    end
    def unconfirmed_email=(val)
    end

@lynndylanhurley
Copy link
Owner

Thanks @UrbanViking, I'll look into this.

@ghost
Copy link
Author

ghost commented Nov 2, 2014

@booleanbetrayal - Thank you for the workaround. I hope that @lynndylanhurley will fix it.

@lynndylanhurley
Copy link
Owner

This should be fixed as of version 0.1.31.beta7. Module exclusion docs are here.

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

No branches or pull requests

2 participants