projects
/
depot.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
cbbd0edb14a7fed627f8f9a417852531f15abfef
[depot.git]
/
company.rb
1
class
Company
<
ActiveRecord
::Base
2
has_one
:mascot
3
attr_protected
:rating
4
set_sequence_name
:companies_nonstd_seq
5
6
validates_presence_of
:name
7
def
validate
8
errors
.
add
(
'rating'
,
'rating should not be 2'
)
if
rating
==
2
9
end
10
end