Sha256: bfea2c591eac7e957e38d89eac5c29c57476fef9ecb1292469be12f4da605596

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

module BrighterPlanet
  module Automobile
    module Relationships
      def self.included(target)
        target.belongs_to :make,                    :class_name => 'AutomobileMake',                 :foreign_key => 'make_name'
        target.belongs_to :make_year,               :class_name => 'AutomobileMakeYear',             :foreign_key => 'make_year_name'
        target.belongs_to :make_model,              :class_name => 'AutomobileMakeModel',            :foreign_key => 'make_model_name'
        target.belongs_to :make_model_year,         :class_name => 'AutomobileMakeModelYear',        :foreign_key => 'make_model_year_name'
        target.belongs_to :make_model_year_variant, :class_name => 'AutomobileMakeModelYearVariant', :foreign_key => 'make_model_year_variant_row_hash'
        target.belongs_to :fuel_type,               :class_name => 'AutomobileFuelType',             :foreign_key => 'fuel_type_code'
        target.belongs_to :size_class,              :class_name => 'AutomobileSizeClass'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
automobile-0.1.5 lib/automobile/relationships.rb
automobile-0.1.3 lib/automobile/relationships.rb