Sha256: 8acfb3fd349e01d9d30c96b83868c19765224fd8a79b9f20562ced599f1deb84

Contents?: true

Size: 225 Bytes

Versions: 103

Compression:

Stored size: 225 Bytes

Contents

class Company < ActiveRecord::Base
  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

Version data entries

103 entries across 103 versions & 9 rubygems

Version Path
classic_pagination-1.0.4 test/fixtures/company.rb
classic_pagination-1.0.3 test/fixtures/company.rb
actionpack-1.12.1 test/fixtures/company.rb
actionpack-1.12.0 test/fixtures/company.rb
actionpack-1.12.3 test/fixtures/company.rb
actionpack-1.12.2 test/fixtures/company.rb
actionpack-1.12.5 test/fixtures/company.rb
actionpack-1.13.0 test/fixtures/company.rb
actionpack-1.12.4 test/fixtures/company.rb
actionpack-1.13.2 test/fixtures/company.rb
actionpack-1.13.1 test/fixtures/company.rb
actionpack-1.13.3 test/fixtures/company.rb
actionpack-1.13.5 test/fixtures/company.rb
actionpack-1.13.6 test/fixtures/company.rb
actionpack-1.13.4 test/fixtures/company.rb
actionpack-2.0.2 test/fixtures/company.rb
actionpack-2.0.1 test/fixtures/company.rb
actionpack-2.0.0 test/fixtures/company.rb
actionpack-2.0.4 test/fixtures/company.rb
actionpack-2.0.5 test/fixtures/company.rb