Sha256: 7ea587655afb72d9065be119785cc45fee021243e5b12b5a9f912b3910137c4e

Contents?: true

Size: 559 Bytes

Versions: 8

Compression:

Stored size: 559 Bytes

Contents

require 'earth/model'

require 'earth/industry/industry'
require 'earth/industry/product_line'

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

  TABLE_STRUCTURE = <<-EOS

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

EOS

  self.primary_key = "row_hash"
  
  belongs_to :industry,     :foreign_key => 'naics_code'
  belongs_to :product_line, :foreign_key => 'ps_code'

end

Version data entries

8 entries across 8 versions & 1 rubygems

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