How to construct a model in rails 3
-
user having one profile.
-
user having one notification
-
user having one role such as admin etc.
I want to make their relation ship.
After making it.
How to use one form to insert data into all these tables at a time.
Any help will be appriciated..
Thank you
search http://guides.rubyonrails.org/association_basics.html to better understand rails associations.
user.rb
You might to put each of the “accepts nested attributes for” on their own line.
The each other model would need:
EDIT
form
Also, in your controller, make sure to have: