OSDN Git Service
(root)
/
redminele
/
redminele.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Move database.yml to template
[redminele/redminele.git]
/
redmine
/
vendor
/
plugins
/
classic_pagination
/
test
/
fixtures
/
company.rb
1
class Company < ActiveRecord::Base
2
attr_protected :rating
3
set_sequence_name :companies_nonstd_seq
4
5
validates_presence_of :name
6
def validate
7
errors.add('rating', 'rating should not be 2') if rating == 2
8
end
9
end