diff options
Diffstat (limited to 'actionview/test/fixtures/company.rb')
-rw-r--r-- | actionview/test/fixtures/company.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionview/test/fixtures/company.rb b/actionview/test/fixtures/company.rb new file mode 100644 index 0000000000..93afdd5472 --- /dev/null +++ b/actionview/test/fixtures/company.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class Company < ActiveRecord::Base + has_one :mascot + self.sequence_name = :companies_nonstd_seq + + validates_presence_of :name + def validate + errors.add("rating", "rating should not be 2") if rating == 2 + end +end |