These relations should work for you:
class Game < ActiveRecord::Base
has_many :game_match_set_relations
has_many :match_sets, through: :game_match_set_relations
class MatchSet < ActiveRecord::Base
has_many :game_match_set_relations
has_many :games, through: :game_match_set_relations
class GameMatchSetRelation < ActiveRecord::Base
belongs_to :game
belongs_to :match_set
validates :game_id, presence: true
validates :match_set_id, presence: true