-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Larry Reid edited this page Jul 9, 2016
·
4 revisions
Welcome to the relationships wiki!
Here's how I built it.
[TODO: How did I do Address and Province?]
The User was initially created by:
rails g model User name:string
The Person was initially created by:
rails g model Person name:string user:references
You then have to modify the person.rb
file so that the belongs_to
line looks like this:
belongs_to :user, optional: true
rails g model AddressPerson address:references person:references address_type:string