2007-01-22 07:43:50 -06:00
|
|
|
class Company < ActiveRecord::Base
|
2008-05-17 23:22:34 -05:00
|
|
|
has_one :mascot
|
2007-01-22 07:43:50 -06:00
|
|
|
attr_protected :rating
|
|
|
|
set_sequence_name :companies_nonstd_seq
|
|
|
|
|
|
|
|
validates_presence_of :name
|
|
|
|
def validate
|
|
|
|
errors.add('rating', 'rating should not be 2') if rating == 2
|
|
|
|
end
|
|
|
|
end
|