Comments (6)
Now the association name is not configurable.
For the time being, you can put
Devise::Models::EmailAuthenticatable.class_eval do
USER_ASSOCIATION = :team
end
in some initialisers.
Then in your Email class:
belongs_to :team
Will this work ?
from devise-multi_email.
Sure, let me try and get back.
Thanks
from devise-multi_email.
Hi,
I tried this but now I get the following error:
NameError: uninitialized constant Devise::Models::EmailAuthenticatable
from devise-multi_email.
How about put that line after the devise
declaration in your team model ?
devise :multi_email_authenticatable, :registerable
Devise::Models::EmailAuthenticatable.class_eval { USER_ASSOCIATION = :team }
from devise-multi_email.
Hey @allenwq thanks for the gem! I got stuck at this point though - neither of the above worked for me and I got the same errors as @SauronTheGreat . Using Rails 5.0.2 and current version of the gem. Any other thoughts? Thanks
from devise-multi_email.
@jarvisjohnson check the https://github.com/allenwq/devise-multi_email/tree/master/examples/rails5_app rails sample app and see the difference with your config ?
from devise-multi_email.
Related Issues (20)
- Cant login after moving all email to new table HOT 27
- Compatibility with `devise-encryptable`
- Emails is invalid HOT 2
- Change primary email method HOT 3
- Multi email invitable module needs to delegate to configured `primary_email_method_name` HOT 5
- Gotchas with using polymorphic belongs_to :owner for emails? HOT 4
- Email validation not showing correct message HOT 6
- Access User record from confirmation email HOT 2
- undefined method `devise' for Email HOT 1
- Deprecation warning in Rails 6.0.0.rc1 for email uniqueness validation HOT 1
- Can we please get a new release? HOT 3
- Add a Rails 6 gemfile HOT 2
- Add a test to the lib/devise/multi_email/email_model_manager.rb
- Initializer not working for version specified on Rubygems
- Allow resetting password with any email HOT 1
- README is wrong about send_devise_notification method placement HOT 1
- chore: Tag 3.0.0 in Git HOT 1
- integration with devise_token_auth
- Fix Rails 6.1 deprecation warning HOT 4
- Move from travis-ci.org to travis-ci.com
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devise-multi_email.