Created
September 3, 2009 08:31
-
-
Save beanieboi/180190 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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