Created
March 23, 2011 21:47
-
-
Save mculp/884095 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
>> c = CarSearch.last | |
=> #<CarSearch id: 906, start_date_time: "2011-03-30 12:00:00", ...> | |
>> cs = c.clone | |
=> #<CarSearch id: nil, start_date_time: "2011-03-30 12:00:00", ...> | |
>> cs.attributes | |
=> {"start_date_time"=>Wed Mar 30 12:00:00 -0500 2011, ...} | |
>> cs.read_attribute :start_date_time | |
=> Wed Mar 30 12:00:00 -0500 2011 | |
>> cs.start_date_time | |
=> Wed Mar 23 17:45:08 -0500 2011 | |
>> cs.write_attribute(:start_date_time, cs.read_attribute(:start_date_time)) | |
=> Wed Mar 30 12:00:00 -0500 2011 | |
>> cs.start_date_time | |
=> Wed Mar 30 12:00:00 -0500 2011 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment