I have two tables User (Devise) and Phones
I would like for it when the user signs up threw registrations done with devise, the user_id and the type of phone is loaded into the Phones table
But I am not sure how to do this. I have linked the User with Phones with
User.rb
has_many :phones
Phones.rb
belongs_to :user
db (schema)
t.index ["user_id"], name: "index_phones_on_user_id"
Any help would be appreciated
accepts_nested_attributes_forwithfields_for