Class: GeoMasterJp::PrefecturesLine

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/geo_master_jp/prefectures_line.rb

Class Method Summary collapse

Class Method Details

.inherited(child) ⇒ Object



8
9
10
11
12
13
# File 'app/models/geo_master_jp/prefectures_line.rb', line 8

def self.inherited(child)
  child.belongs_to :prefecture, class_name: GeoMasterJp.config.alternative_class_name(:prefecture), foreign_key: :geo_master_jp_prefecture_code, primary_key: :code
  child.belongs_to :line,       class_name: GeoMasterJp.config.alternative_class_name(:line),       foreign_key: :geo_master_jp_line_code,       primary_key: :code

  super
end