Sha256: 278bc0847528f82ce76f1a387c9657e907745cdf47c2b3af5042fde8ef3ccb92

Contents?: true

Size: 535 Bytes

Versions: 8

Compression:

Stored size: 535 Bytes

Contents

require 'earth/model'

require 'earth/industry/industry'
require 'earth/industry/sector'

class IndustrySector < ActiveRecord::Base
  extend Earth::Model

  TABLE_STRUCTURE = <<-EOS

CREATE TABLE industry_sectors
  (
     row_hash   CHARACTER VARYING(255) NOT NULL PRIMARY KEY,
     naics_code CHARACTER VARYING(255),
     ratio      FLOAT,
     io_code    CHARACTER VARYING(255)
  );

EOS

  self.primary_key = "row_hash"
  
  belongs_to :industry,  :foreign_key => 'naics_code'
  belongs_to :sector,    :foreign_key => 'io_code'
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
earth-1.2.1 lib/earth/industry/industry_sector.rb
earth-1.1.2 lib/earth/industry/industry_sector.rb
earth-1.1.1 lib/earth/industry/industry_sector.rb
earth-1.1.0 lib/earth/industry/industry_sector.rb
earth-1.0.3 lib/earth/industry/industry_sector.rb
earth-1.0.2 lib/earth/industry/industry_sector.rb
earth-1.0.1 lib/earth/industry/industry_sector.rb
earth-1.0.0 lib/earth/industry/industry_sector.rb