Sha256: 13eea2e7e42ca746730550c772f9c87c706b7bab50ae666ba95dea4c2f5a3e17

Contents?: true

Size: 372 Bytes

Versions: 46

Compression:

Stored size: 372 Bytes

Contents

class ReferenceType < ActiveRecord::Base
  self.primary_key = :reference_type_id
  has_many :reference_codes, :foreign_key => "reference_type_id", :dependent => :destroy
  accepts_nested_attributes_for :reference_codes

  validates_presence_of :type_label, :abbreviation
  validates_uniqueness_of :type_label

  before_destroy do |record|
    record
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
composite_primary_keys-13.0.1 test/fixtures/reference_type.rb
composite_primary_keys-13.0.0 test/fixtures/reference_type.rb
composite_primary_keys-12.0.10 test/fixtures/reference_type.rb
composite_primary_keys-12.0.9 test/fixtures/reference_type.rb
composite_primary_keys-12.0.8 test/fixtures/reference_type.rb
composite_primary_keys-12.0.6 test/fixtures/reference_type.rb
composite_primary_keys-12.0.5 test/fixtures/reference_type.rb
composite_primary_keys-12.0.4 test/fixtures/reference_type.rb
composite_primary_keys-12.0.3 test/fixtures/reference_type.rb
composite_primary_keys-12.0.2 test/fixtures/reference_type.rb
composite_primary_keys-11.3.1 test/fixtures/reference_type.rb
composite_primary_keys-12.0.1 test/fixtures/reference_type.rb
composite_primary_keys-12.0.0 test/fixtures/reference_type.rb
composite_primary_keys-12.0.0.rc5 test/fixtures/reference_type.rb
composite_primary_keys-12.0.0.rc4 test/fixtures/reference_type.rb
composite_primary_keys-12.0.0.rc3 test/fixtures/reference_type.rb
composite_primary_keys-12.0.0.rc2 test/fixtures/reference_type.rb
composite_primary_keys-12.0.0.rc1 test/fixtures/reference_type.rb
composite_primary_keys-11.2.0 test/fixtures/reference_type.rb
composite_primary_keys-11.1.0 test/fixtures/reference_type.rb