Sha256: 76958825a1bedfa6b46a31cb104be5d095d2690470102409071147f7f6f9838a

Contents?: true

Size: 575 Bytes

Versions: 7

Compression:

Stored size: 575 Bytes

Contents

require 'earth/model'

require 'earth/industry/industry'
require 'earth/industry/merchant_category_industry'

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

  TABLE_STRUCTURE = <<-EOS

CREATE TABLE merchant_categories
  (
     mcc         CHARACTER VARYING(255) NOT NULL PRIMARY KEY,
     description CHARACTER VARYING(255)
  );

EOS

  self.primary_key = "mcc"

  has_many :merchant_category_industries, :foreign_key => 'mcc'
  has_many :industries, :through => :merchant_category_industries

  def name
    description
  end

  warn_unless_size 285
end

Version data entries

7 entries across 7 versions & 1 rubygems

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