repo.or.cz
/
akelos.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fixing content type ordering when content_type is not defined.
[akelos.git]
/
test
/
fixtures
/
app
/
models
/
post.php
blob
e3c771e399fd39063c9e0b6ff9c6c56ff35f0bc0
1
<
?php
2
3
class
Post
extends
ActiveRecord
4
{
5
var
$has_many
=
'comments'
;
6
var
$habtm
=
'tags,users'
;
7
8
function
validate
()
9
{
10
if
(
$this
->
comments_count
<
0
){
11
$this
->
addError
(
'comments_count'
,
'can
\'
t be negative'
);
12
}
13
}
14
}
15
16
?
>