title: Rails model association for a soccer match. Match has two Country
body: <p>Any suggestions on how to set up this relationship? A <code>Match</code> has two <code>Country</code> on each side, right?</p>
  
  <p>However, Rails Admin is complaining that this is not the right way.</p>
  
  <pre><code>create_table "countries", force: true do |t|
    t.string   "name"
    t.string   "flag"
    t.datetime "created_at"
    t.datetime "updated_at"
  end
  
  create_table "matches", force: true do |t|
    t.integer "country_a"
    t.integer "country_b"
    t.integer "score_country_a"
    t.integer "score_country_b"
  end
  
  class Country &lt; ActiveRecord::Base
    belongs_to :matches
  end
  
  class Match &lt; ActiveRecord::Base
    belongs_to :country_side_a, foreign_key: :country_a
    belongs_to :country_side_b, foreign_key: :country_b
  end
  </code></pre>
  
  <p>How can I configure these relationships properly?</p>