Skip to content

Instantly share code, notes, and snippets.

@beanieboi
Created September 3, 2009 08:31
Show Gist options
  • Save beanieboi/180190 to your computer and use it in GitHub Desktop.
Save beanieboi/180190 to your computer and use it in GitHub Desktop.
def house_id
@house_id
end
def house_id=house_id
@house_id = house_id
end
def room_number
if !self.room.nil?
self.room.number
end
end
def room_number=number
@room = Room.find(:first, :conditions => { :number => number })
@house = House.find @house_id
@room.house = @house
self.room = @room
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment