Sha256: 0805a2c35d06a3261feccc5cb89a01543a82babc743daae33b78ceaa657cb922

Contents?: true

Size: 573 Bytes

Versions: 3

Compression:

Stored size: 573 Bytes

Contents

require ::File.join(Earth.vendor_dir, 'geokit-rails', 'lib', 'geokit-rails')
require 'earth/locality'

class Airport < ActiveRecord::Base
  set_primary_key :iata_code
  
  belongs_to :country, :foreign_key => 'country_iso_3166_code', :primary_key => 'iso_3166_code'
  
  acts_as_mappable :default_units => :nms,
                   :lat_column_name => :latitude,
                   :lng_column_name => :longitude

  col :iata_code
  col :name
  col :city
  col :country_name
  col :country_iso_3166_code
  col :latitude, :type => :float
  col :longitude, :type => :float
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
earth-0.11.10 lib/earth/air/airport.rb
earth-0.11.9 lib/earth/air/airport.rb
earth-0.11.8 lib/earth/air/airport.rb