make json readable

This commit is contained in:
Rueshyna 2012-11-09 16:24:23 +08:00
parent 80abfc80bf
commit 624d12de6d
1 changed files with 5 additions and 1 deletions

View File

@ -68,6 +68,10 @@ class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController
latitude: location.latitude,
description: location.description }
end
render :json => @data.to_json
#print readable json
render :json => JSON.pretty_generate({location: @data})
#render :json => {location: @data}.to_json
end
end