jnicklas/carrierwave — Issue #590: to_json and to_xml have different behavior
Author: alecslupu
Created: 2012-01-18 15:56:05+00:00
State: open

I have this in my controller

respond_to do |format|
format.json { render :json => @picture }
format.xml { render :xml => @picture }
end

My json renders something like

[
"image":
{
"url":"/uploads/picture/2012/01/1/29c2f4cc168a9af416001609e437d37c.jpg",
"small":{
"url":"/uploads/picture/2012/01/1/small_29c2f4cc168a9af416001609e437d37c.jpg"
}
}
]

while my xml format renders something like

d7af79d498b609a1b9090fa2dbf7c354.jpg