From: Ryan Davis Date: 2009-01-21T06:26:29+09:00 Subject: Re: rails console output shows "\n" rather than putting in new line? is there a way to change this? On Jan 20, 2009, at 12:00 , Greg Hauptmann wrote: > Hi, > I note rails console shows "\n" rather than putting in new line? For > example: > > ?> Category.find(:first).to_yaml > => "--- !ruby/object:Category \nattributes: \n updated_at: 2009-01-20 > 03:39:22\n tax_item_id: \n category_type_id: \"2\"\n title: > Investment\n id: > \"1\"\n category_id: \n category_group_id: \"5\"\n created_at: > 2009-01-20 > 03:39:22\n active: \"0\"\nattributes_cache: {}\n\n" irb inspects the result, either don't convert it to a string, or print it. ?> Category.find(:first) or ?> y Category.find(:first) or as rob pointed out: ?> puts Category.find(:first).to_yaml Usually I don't care about all the fields, so I'll do something like ?> Category.find(:first).title and leave it at that.