Sha256: a86f35ed7e387edd49ad487e55d3dfb480adce24993e5896f0cae824d83a90ad
Contents?: true
Size: 357 Bytes
Versions: 66
Compression:
Stored size: 357 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] validates_uniqueness_of :student_id before_destroy do |record| puts record end after_destroy do |record| puts record end end
Version data entries
66 entries across 66 versions & 1 rubygems