theorem.rb revision 37d0428752228b885ae94e6b0aea5452787fb102
ce95113287f87460dd557d818280639fc2a31e19Dwight Engen DEFAULT_STATUS = ProofStatus::DEFAULT_OPEN_STATUS
be2e4e54da3c8054525321422f7f290d45b32a6cStéphane Graber has_many :proof_attempts, foreign_key: 'sentence_id', dependent: :destroy
be2e4e54da3c8054525321422f7f290d45b32a6cStéphane Graber attr_accessible :state, :state_updated_at, :last_error
be2e4e54da3c8054525321422f7f290d45b32a6cStéphane Graber validates :state, inclusion: {in: State::STATES}
be2e4e54da3c8054525321422f7f290d45b32a6cStéphane Graber self.proof_status = ProofStatus.find(DEFAULT_STATUS) unless proof_status
save!