Sha256: 36e6387ac4a21daaa5860997d03f7e9ab75e2cb5d70bf250b193449d216867c2

Contents?: true

Size: 360 Bytes

Versions: 17

Compression:

Stored size: 360 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

17 entries across 17 versions & 1 rubygems

Version Path
composite_primary_keys-14.0.9 test/fixtures/reference_type.rb
composite_primary_keys-14.0.8 test/fixtures/reference_type.rb
composite_primary_keys-13.0.8 test/fixtures/reference_type.rb
composite_primary_keys-14.0.7 test/fixtures/reference_type.rb
composite_primary_keys-14.0.6 test/fixtures/reference_type.rb
composite_primary_keys-13.0.7 test/fixtures/reference_type.rb
composite_primary_keys-13.0.6 test/fixtures/reference_type.rb
composite_primary_keys-14.0.5 test/fixtures/reference_type.rb
composite_primary_keys-13.0.5 test/fixtures/reference_type.rb
composite_primary_keys-13.0.4 test/fixtures/reference_type.rb
composite_primary_keys-14.0.4 test/fixtures/reference_type.rb
composite_primary_keys-14.0.3 test/fixtures/reference_type.rb
composite_primary_keys-13.0.3 test/fixtures/reference_type.rb
composite_primary_keys-14.0.2 test/fixtures/reference_type.rb
composite_primary_keys-13.0.2 test/fixtures/reference_type.rb
composite_primary_keys-14.0.1 test/fixtures/reference_type.rb
composite_primary_keys-11.0.0.rc2 test/fixtures/reference_type.rb