Sha256: 9edb6c77fdb354ca0226415f16c9f27cbdbb613f9d2085901e572cb2462fcb21
Contents?: true
Size: 439 Bytes
Versions: 9
Compression:
Stored size: 439 Bytes
Contents
class Room < ActiveRecord::Base self.primary_keys = :dorm_id, :room_id belongs_to :dorm has_many :room_assignments, :foreign_key => [:dorm_id, :room_id] has_many :room_attribute_assignments, :foreign_key => [:dorm_id, :room_id] has_many :room_attributes, :through => :room_attribute_assignments def find_custom_room_attributes room_attributes.find(:all, :conditions => ["room_attributes.name != ?", "type"]) end end
Version data entries
9 entries across 9 versions & 1 rubygems