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-11.0.3 test/fixtures/reference_type.rb
composite_primary_keys-11.0.2 test/fixtures/reference_type.rb
composite_primary_keys-10.0.5 test/fixtures/reference_type.rb
composite_primary_keys-9.0.10 test/fixtures/reference_type.rb
composite_primary_keys-11.0.1 test/fixtures/reference_type.rb
composite_primary_keys-11.0.0 test/fixtures/reference_type.rb
composite_primary_keys-10.0.4 test/fixtures/reference_type.rb
composite_primary_keys-9.0.9 test/fixtures/reference_type.rb
composite_primary_keys-10.0.3 test/fixtures/reference_type.rb
composite_primary_keys-11.0.0.rc1 test/fixtures/reference_type.rb
composite_primary_keys-11.0.0.beta4 test/fixtures/reference_type.rb
composite_primary_keys-11.0.0.beta3 test/fixtures/reference_type.rb
composite_primary_keys-11.0.0.beta2 test/fixtures/reference_type.rb
composite_primary_keys-11.0.0.beta1 test/fixtures/reference_type.rb
composite_primary_keys-10.0.2 test/fixtures/reference_type.rb
composite_primary_keys-10.0.1 test/fixtures/reference_type.rb
composite_primary_keys-9.0.8 test/fixtures/reference_type.rb
composite_primary_keys-10.0.0 test/fixtures/reference_type.rb
composite_primary_keys-9.0.7 test/fixtures/reference_type.rb
composite_primary_keys-9.0.6 test/fixtures/reference_type.rb