I'm using devise and as per the documentations recommendations I have a User model (for devise) and a Profile model for user data such as names, job etc. Why is it considered "not so good" to just store all these attributes on the devise User model table. Just curious.
Adding fields to tables specified by an external source could result in migration errors in future versions of the gem if the gem changes the table definition.
Think of the users table as an implementation detail of the devise gem. It's generally a bad idea to modify the source of an external library because it makes upgrades difficult or impossible.
Separation of concern! The User
model is used by devise
(which handles
app auth and access) while the Profile
model handles all the business logic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With