Skip to content

Instantly share code, notes, and snippets.

@zachinglis
Created April 3, 2009 20:19
Show Gist options
  • Save zachinglis/89941 to your computer and use it in GitHub Desktop.
Save zachinglis/89941 to your computer and use it in GitHub Desktop.
## Listing
has_one :residential
delegate :room_desc
## Listing::Residential
## Console
>> listing.room_desc = "This is a room"
=> "This is a room"
>> listing.room_desc
=> "This is a room"
>> listing.attributes[:room_desc] = "this is something else"
=> "this is something else"
>> listing.room_desc
=> "This is a room"
## What I want to do
listing = Listing.new
listing.build_residential
listing.attributes = attributes_hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment