Sha256: 139cdf8e4aa7954290a870851081fefd86de43c32116ae9347ac76d1e9c5f31f
Contents?: true
Size: 438 Bytes
Versions: 6
Compression:
Stored size: 438 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 != ?", "keg"]) end end
Version data entries
6 entries across 6 versions & 1 rubygems