I have a user table which contains the user registration details such as username, password and email…
How can I add a profile table to store name, country, age etc… ?
Do I simply create the table and use JOIN to select the data or is there another way to do this using Ruby on Rails?
Use a migration to add those columns to the user model. From the sounds of it I don’t think you would actually need a separate model for those attributes.
your migration might look something like
Then you can pull the data as you need it by doing @user.country or something along those lines. Hope this helps