Модель страны
set_table_name "countries"
has_many :states, :primary_key => 'col1', :foreign_key => 'col1'
has_many :cities, :through => :states, :primary_key => 'col1', :foreign_key => 'col1'
Модель штата
set_table_name "strain_appendices"
belongs_to :country
has_many :states, :primary_key => 'col2', :foreign_key => 'col2'
Модель города
set_table_name "ssu_accessions"
belongs_to :country
belongs_to :state
Просмотр
<% @countries.each do |country| %>
<%= country.high %>
<% country.states.each do |state| %>
<%= state.high %>
<% country.cities.each do |city| %>
<%= city.high %>
<%= country.high %>
и <%= state.high %>
дают хороший вывод.Но <%= city.high %>
показывает ошибку как «неинициализированная константа Country :: City».Где может быть проблема?Кто-нибудь поможет мне?