Cross Reference: theorem.rb
xref
: /
ontohub
/
app
/
models
/
theorem.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
theorem.rb revision b4a0129f99341fb8b1f0d724e656d339c97e9db0
class
Theorem
<
Sentence
DEFAULT_STATUS
=
'OPN'
has_many
:
proof_attempts
,
foreign_key
:
'sentence_id'
before_save
:
set_default_proof_status
attr_accessible
:
proof_status
validates_inclusion_of
:
proof_status
,
in
:
ProofAttempt
::
STATUSES
def
set_default_proof_status
self.proof
_status
=
DEFAULT_STATUS
unless
proof_status
end
def
update_proof_status
(
proof_status
)
if
ProofAttempt.decisive
_status
?
(
proof_status
)
||
!
ProofAttempt.decisive
_status
?
(
self.proof
_status
)
self.proof
_status
=
proof_status
save
end
end
end