Comments (6)
@allenwq to clarify, when doing the following:
user.update(email: '[email protected]')
user.errors.full_messages.first
=> "Email is invalid"
But when updating the email directly, you get the following:
email.update(email: '[email protected]')
email.errors.full_messages.first
=> "Email has already been taken"
from devise-multi_email.
@swrobel Yes, I get it, this is a rails behaviour. we can fix it by propagating the email errors one level up. but i am not sure if we should leave the application to handle it... let me think.
from devise-multi_email.
@allenwq @ArthurWD does this do anything to fix this issue? #24
from devise-multi_email.
Seems to me like this issue is indeed fixed by #24.
I get this result:
user.update(email: '[email protected]')
user.errors.full_messages.first
=> "Email has already been taken"
from devise-multi_email.
@ArthurWD wow, I didn't expect that.
@jeremylynch Can verify if this is still an issue?
from devise-multi_email.
@ArthurWD that's odd, I can't seem to replicate that behavior. I still get Email is invalid
with latest master & Rails 5.2.0
Update: I'm able to get the same behavior that @ArthurWD sees by adding autosave: true
to my emails association, ex:
has_many :emails, autosave: true
This doesn't require using the latest w/ ArthurWD's change merged.
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
- 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.