I setup Devise on User
model with its default options.
I also have a Company
model that needs to add data added whenever a user registers. A company owner setups a User
to login with and a Company
profile, both in the same form.
I setup Company
model with has_many :users
and User
with has_one :company
, but I keep getting Can't mass-assign protected
when submitting the form. I followed Profile model for Devise users? and others from Stackoverflow, but no luck.
How can I setup the User
and Company
model to add the necessary data whenever a user registers? User data to User
and company data to Company
.