I'm trying to print JSON data in a view in a 'pretty' human readable format. I have a controller:
def show
h = JSON.parse(RestClient.get("http://link_to_get_json"))
@json = JSON.pretty_generate(h)
end
and a simple view:
= @json
But all I see, when I load the page, is the same JSON I've got, not formatted. What do I do wrong?