Hi,
Country Model
set_table_name "countries"
has_many :states, :primary_key => 'col1', :foreign_key => 'col1'
has_many :cities, :through => :states, :primary_key => 'col1', :foreign_key => 'col1'
State Model
set_table_name "strain_appendices"
belongs_to :country
has_many :states, :primary_key => 'col2', :foreign_key => 'col2'
City Model
set_table_name "ssu_accessions"
belongs_to :country
belongs_to :state
View
<% @countries.each do |country| %>
<%= country.high %>
<% country.states.each do |state| %>
<%= state.high %>
<% country.cities.each do |city| %>
<%= city.high %>
<%= country.high %>
and <%= state.high %>
give nice output. But, <%= city.high %>
shows error as "uninitialized constant Country::City". Where may be the problem? Anybody help me.