Rails: One model for Authentication and Profile information or 2 separate models

Viewed 930

In many tutorials (especially for authentication), speakers say to put user authentication and profile information in the same table (model) called User.

My question is simple: Is it safe to put everything in one table? (bonus: is this the best practice?)

I would rather suggest to separate authentication information (email, password, salt,...) and profile information (first name, last name, birth day, location, gender,...) in two models: User (for authentication) and Profile, and linking models by has_one/belongs_to associations.

Am I wrong? What do you suggest me?

Thanks.

2 Answers
Related