Sha256: 7f318894a984d874d917e0d35dcc5e7249ccc29dceb81c8dca4c244a54facc5d

Contents?: true

Size: 325 Bytes

Versions: 18

Compression:

Stored size: 325 Bytes

Contents

class ReferenceType < ActiveRecord::Base
  set_primary_key :reference_type_id
  has_many :reference_codes, :foreign_key => "reference_type_id", :dependent => :destroy
  
  validates_presence_of :type_label, :abbreviation
  validates_uniqueness_of :type_label

  before_destroy do |record|
    a = record
    puts a
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
composite_primary_keys-3.1.11 test/fixtures/reference_type.rb
composite_primary_keys-4.0.0 test/fixtures/reference_type.rb
composite_primary_keys-4.0.0.beta9 test/fixtures/reference_type.rb
composite_primary_keys-4.0.0.beta8 test/fixtures/reference_type.rb
composite_primary_keys-4.0.0.beta7 test/fixtures/reference_type.rb
composite_primary_keys-4.0.0.beta6 test/fixtures/reference_type.rb
composite_primary_keys-4.0.0.beta5 test/fixtures/reference_type.rb
composite_primary_keys-4.0.0.beta4 test/fixtures/reference_type.rb
composite_primary_keys-4.0.0.beta3 test/fixtures/reference_type.rb
composite_primary_keys-3.1.10 test/fixtures/reference_type.rb
composite_primary_keys-4.0.0.beta2 test/fixtures/reference_type.rb
composite_primary_keys-4.0.0.beta1 test/fixtures/reference_type.rb
composite_primary_keys-3.1.9 test/fixtures/reference_type.rb
composite_primary_keys-3.1.8 test/fixtures/reference_type.rb
composite_primary_keys-3.1.7 test/fixtures/reference_type.rb
composite_primary_keys-3.1.6 test/fixtures/reference_type.rb
composite_primary_keys-3.1.5 test/fixtures/reference_type.rb
composite_primary_keys-3.1.4 test/fixtures/reference_type.rb