Skip to content

Instantly share code, notes, and snippets.

@bobbrez
Forked from galiat/gist:1248941
Created September 28, 2011 19:24
Show Gist options
  • Save bobbrez/1248945 to your computer and use it in GitHub Desktop.
Save bobbrez/1248945 to your computer and use it in GitHub Desktop.
class Address < ActiveRecord::Base
belongs_to :contact
validates_presence_of :street, :town
end
class Contact < ActiveRecord::Base
has_many :addresses
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment