lib/earth/industry/mecs_ratio.rb in earth-0.11.7 vs lib/earth/industry/mecs_ratio.rb in earth-0.11.8

- old
+ new

@@ -1,34 +1,16 @@ +require 'earth/locality' +require 'earth/industry/industry' + class MecsRatio < ActiveRecord::Base - belongs_to :industry + set_primary_key :name col :name col :census_region col :naics_code col :consumption_per_dollar_of_shipments, :type => :float - - CENSUS_REGIONS = { - 'Total US' => { - :crop => (16..94), - :code => nil - }, - 'Northeast' => { - :crop => (100..178), - :code => 1 - }, - 'Midwest' => { - :crop => (184..262), - :code => 2 - }, - 'South' => { - :crop => (268..346), - :code => 3 - }, - 'West' => { - :crop => (352..430), - :code => 4 - } - } + + belongs_to :industry def self.find_by_naics_code_and_census_region(code, census_region) if code.blank? record = nil else