Skip to content

Instantly share code, notes, and snippets.

@jessenaiman
Last active December 18, 2015 11:19
Show Gist options
  • Save jessenaiman/5774872 to your computer and use it in GitHub Desktop.
Save jessenaiman/5774872 to your computer and use it in GitHub Desktop.
class Address
include Mongoid::Document
field :address, type: String
field :address2, type: String
field :city, type: String
field :province, type: String
field :postal_code, type: String
field :phone_number, type: String
field :toll_free_phone_number, type: String
field :fax_number, type: String
field :email, type: String
embedded_in :riding
end
class Riding
include Mongoid::Document
include Mongoid::Timestamps
field :id, type: Integer
field :title, localize: true
embeds_many :addresses
#belongs_to :user
#has_one :riding_executive
field :introduction, localize: true
field :language, type: String
field :created_date, type: DateTime
field :created_ip, type: String
field :created_user_id, type: Integer #, :references => created_users
field :updated_ip, type: String
field :document_date, type: DateTime
field :riding_id, type: Integer
field :web_site, type: String
field :coordinates, :type => Array
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment