axiom_selection.rb revision 40d9da20e258c7ed57f2b0299732b1925b095cb1
class AxiomSelection < ActiveRecord::Base
METHODS = %i(manual_axiom_selection)
acts_as_superclass
has_one :proof_attempt_configuration
has_and_belongs_to_many :axioms,
class_name: 'Axiom',
association_foreign_key: 'sentence_id',
join_table: "axioms_axiom_selections"
validate :proof_attempt_configuration, presence: true
# This seems to be the only way to remove the default scope
# (non-imported sentences) from the association
def axioms
super.where(imported: [true, false])
end
end