Sha256: 66ff1d318466d735ea6dcdb4f76670245d9592eeb7a31d5cf5b359eec46c6474
Contents?: true
Size: 675 Bytes
Versions: 39
Compression:
Stored size: 675 Bytes
Contents
class Industry < ActiveRecord::Base extend Earth::Base set_primary_key :naics_code has_many :merchant_category_industries, :foreign_key => 'naics_code' has_many :industry_product_lines, :foreign_key => 'naics_code' has_many :product_lines, :through => :industry_product_lines has_many :industry_sectors, :foreign_key => 'naics_code' has_many :sectors, :through => :industry_sectors def self.schema_definition lambda do string 'naics_code' string 'description' end end data_miner do Industry.define_schema(self) end def trade_industry? prefix = naics_code.to_s[0,2] %w{42 44 45}.include?(prefix) end end
Version data entries
39 entries across 39 versions & 1 rubygems