Hi all
I have following schemas:
schema "countries" do
belongs_to :lang, LanguageCode, foreign_key: :code
field :text, :string
timestamps
end
schema "languages_code" do
has_one :code, Country, foreign_key: :lang
field :text, :string
timestamps
end
My question is, when I am going to create the third table that should belongs to LanguageCode
too:
schema “table3” do
belongs_to :coun, CountryCode, foreign_key: :alpha2
field :text, :string
timestamps
end
how do I have to modify the languages_code
schema?
Thanks