Sha256: 1e0366aeefbbd408c26097c2d0885296d18bad2a088050cec456961d581f56e0
Contents?: true
Size: 428 Bytes
Versions: 29
Compression:
Stored size: 428 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.where("room_attributes.name != ?", "type") end end
Version data entries
29 entries across 29 versions & 1 rubygems