Sha256: 415697f30f80ec304ea2c394ea46ee2cc1c358bec53995fcd02d14bf65ab5173

Contents?: true

Size: 251 Bytes

Versions: 96

Compression:

Stored size: 251 Bytes

Contents

# 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

Version data entries

96 entries across 48 versions & 2 rubygems

Version Path
jets-1.9.7 vendor/rails/actionview/test/fixtures/company.rb
jets-1.9.7 vendor/rails/actionpack/test/fixtures/company.rb
jets-1.9.6 vendor/rails/actionview/test/fixtures/company.rb
jets-1.9.6 vendor/rails/actionpack/test/fixtures/company.rb
jets-1.9.5 vendor/rails/actionview/test/fixtures/company.rb
jets-1.9.5 vendor/rails/actionpack/test/fixtures/company.rb
jets-1.9.4 vendor/rails/actionpack/test/fixtures/company.rb
jets-1.9.4 vendor/rails/actionview/test/fixtures/company.rb
jets-1.9.3 vendor/rails/actionpack/test/fixtures/company.rb
jets-1.9.3 vendor/rails/actionview/test/fixtures/company.rb
jets-1.9.2 vendor/rails/actionpack/test/fixtures/company.rb
jets-1.9.2 vendor/rails/actionview/test/fixtures/company.rb
jets-1.9.1 vendor/rails/actionpack/test/fixtures/company.rb
jets-1.9.1 vendor/rails/actionview/test/fixtures/company.rb
jets-1.9.0 vendor/rails/actionpack/test/fixtures/company.rb
jets-1.9.0 vendor/rails/actionview/test/fixtures/company.rb
jets-1.8.14 vendor/rails/actionpack/test/fixtures/company.rb
jets-1.8.14 vendor/rails/actionview/test/fixtures/company.rb
jets-1.8.13 vendor/rails/actionpack/test/fixtures/company.rb
jets-1.8.13 vendor/rails/actionview/test/fixtures/company.rb