Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/splits-io. a speedrunning data store and analysis engine splits.io
Something went wrong. Try again.
123456789101112class Rivalry < ApplicationRecord validates_uniqueness_of :category, scope: :from_user_id
belongs_to :category belongs_to :from_user, class_name: 'User' belongs_to :to_user, class_name: 'User'
has_one :game, through: :category
scope :for_category, ->(category) { where(category: category) }end