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

Set default provider to "email" in migration #302

Merged
merged 1 commit into from
Jul 13, 2015

Conversation

colavitam
Copy link
Contributor

This change should fix incompatibility with standard devise controllers using default
migrations. Standard devise allows for provider to be null, but devise_token_auth requires it to have a value (as enforced by the default migration). The generated migration now sets this field to "email" by default. It should resolve #257 when the new migration is used. Setting the provider in the standard registrations controller is now redundant, but I left it as is to avoid breaking existing installations using the old migration.

Fixes incompatibility with standard devise controllers using default
migrations.
@colavitam
Copy link
Contributor Author

It may also be important to note that the scheme this app uses for setting the provider column isn't consistent with that used by standard devise. Changing the controllers and migrations to allow provider to be nil instead of "email" may make more sense, but it would likely make supporting users created by earlier versions more difficult.

@booleanbetrayal
Copy link
Collaborator

This seems sane to me. Thanks for the PR @colavitam !

booleanbetrayal added a commit that referenced this pull request Jul 13, 2015
Set default provider to "email" in migration
@booleanbetrayal booleanbetrayal merged commit 89e06eb into lynndylanhurley:master Jul 13, 2015
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

Successfully merging this pull request may close these issues.

undefined method `provider' for #<User:0x007f49fd5da2e8>
2 participants