Sha256: 6c0744c8f4c7d8b69f8b7b9de26afbf5210807cf86431d5300b1ca9f99d1b973

Contents?: true

Size: 319 Bytes

Versions: 6

Compression:

Stored size: 319 Bytes

Contents

class RoomAssignment < ActiveRecord::Base
  self.primary_keys = :student_id, :dorm_id, :room_id
  belongs_to :student
  belongs_to :room, :foreign_key => [:dorm_id, :room_id], :primary_key => [:dorm_id, :room_id]

  before_destroy do |record|
    puts record
  end

  after_destroy do |record|
    puts record
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
composite_primary_keys-5.0.6 test/fixtures/room_assignment.rb
composite_primary_keys-5.0.5 test/fixtures/room_assignment.rb
composite_primary_keys-5.0.4 test/fixtures/room_assignment.rb
composite_primary_keys-5.0.2 test/fixtures/room_assignment.rb
composite_primary_keys-5.0.1 test/fixtures/room_assignment.rb
composite_primary_keys-5.0.0 test/fixtures/room_assignment.rb