From: Rajat Garg Date: 2008-11-21T14:42:26+09:00 Subject: can't convert Hash into String Hi, I get an XML like this from a hotel API - Oriental Riverside Hotel - Pudong Shanghai No. 2727, Riverside Ave., Pu SHANGHAI CN SHA in rhtml page, I get an error - ActionView::TemplateError (can't convert Hash into String) on line #36 of app/views/hotels2/city_hotels.rhtml: 33: address += ' ' 34: 35: if hotel['postalCode'][0].is_a?(Hash) 36: address += hotel['postalCode'][0] 37: end 38: 39: description = hotel['shortDescription'][0] It is not able to interpret empty postal code tag correctly. How should I handle it? Thanks /r http://www.pilotoutlook.com -- Posted via http://www.ruby-forum.com/.