Sha256: 13bbf65d5a21734928af80a2a8e4bb1bf768a4118573f1b21e2217addfe64bbd
Contents?: true
Size: 435 Bytes
Versions: 18
Compression:
Stored size: 435 Bytes
Contents
class Room < ActiveRecord::Base set_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 != ?", "keg"]) end end
Version data entries
18 entries across 18 versions & 1 rubygems