Ok, I have a project that using rails 2.1. I run ruby script/console
and here is what I see:
BannerFile.find :last
=> #<BannerFile id: 29, banner_position_id: 8, client: “E2Ma Consumer
Profiling”, name: “H&M kledingcheque_Rectangle_13-02-08”, file:
“mde_7.jpg”, target_url: “Jouw Toekomstige Hosting Partner Welkom!?
an=1024&i…”, start_date: “2008-02-12”, end_date: “2008-03-13”,
created_at: “2008-02-13 10:20:11”, updated_at: “2008-06-20 12:00:19”,
status: nil, impression_count: 0, click_count: 0, file_meta: nil>
This is what we see in rails 1.2.3
b=BannerFile.find 2
=> #<BannerFile:0x2320828 @attributes={“status”=>nil,
“end_date”=>“2008-01-06”, “start_date”=>“2008-01-05”, “name”=>“flash
banner”, “updated_at”=>“2008-06-20 12:05:57”, “target_url”=>“http://
www.sina.com.cn”, “banner_position_id”=>“2”, “client”=>“Carp”,
“id”=>“2”, “click_count”=>“0”, “impression_count”=>“11”,
“file_meta”=>nil, “created_at”=>“2008-01-07 07:08:20”,
“file”=>“121409_home-284bt.swf”}>
See the difference? So can anyone tell me why in rails 2.1
activerecord object is printed differently? Thanks.
Snow