Skip to content

Instantly share code, notes, and snippets.

@aakashd
Created February 22, 2010 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aakashd/310879 to your computer and use it in GitHub Desktop.
Save aakashd/310879 to your computer and use it in GitHub Desktop.
class Address < ActiveRecord::Base
belongs_to :listing
belongs_to :neighbourhood
belongs_to :creator, :class_name => User, :foreign_key => 'creator_id'
belongs_to :updater, :class_name => User, :foreign_key => 'updater_id'
end
# == Schema Information
#
# Table name: addresses
#
# id :integer(4) not null, primary key
# street_1 :string(255)
# street_2 :string(255)
# landmark :string(255)
# neighbourhood_id :integer(4)
# listing_id :integer(4)
# pincode :integer(4)
# creator_id :integer(4)
# updater_id :integer(4)
# created_at :datetime
# updated_at :datetime
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment