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
backlog-0.7.0 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.6.6 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.1 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.10 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.12 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.11 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.2 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.3 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.4 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.5 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.7 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.6 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.8 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.7.9 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.8.0 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.9.0 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.8.1 vendor/rails/actionpack/test/fixtures/company.rb
backlog-0.9.1 vendor/rails/actionpack/test/fixtures/company.rb
parlement-0.17 vendor/plugins/classic_pagination/test/fixtures/company.rb
radiant-0.6.1 vendor/rails/actionpack/test/fixtures/company.rb