OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/lib/plugins/classic_pagination/test/fixtures/company.rb

13 lines
302 B

#-- encoding: UTF-8
class Company < ActiveRecord::Base
attr_protected :rating
set_sequence_name :companies_nonstd_seq
validates_presence_of :name
validate :rating_does_not_equal_two
def rating_does_not_equal_two
errors.add('rating', 'rating should not be 2') if rating == 2
end
end