Awesome Print a Ruby Hash

605 Views Asked by At

I am trying to output a hash which is the result of calling Flickr's collection.getTree method.

I have:

ap @flickr_collections

It IS printing out the hash but with all the escaped html tags around it. How can I get around this. I did try .html_safe but it didn't work.

Basically all I want is a nice pretty printed output of this hash. Nothing more nothing less.

UPDATE:

This is what I am running: = ap(@flickr_collections, html: true)

and the output is:

<pre class="debug_dump">{ <pre>&quot;collections&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre>{ <pre>&quot;collection&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre>[ <kbd style="color:white">[0] </kbd><pre>{ <pre>&quot;set&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre>[ <kbd style="color:white">[0] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629511800621&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;On-Ride Photography&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[1] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629391565747&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;First Day with Flash, Rocket &amp; Piper&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre> ]</pre>, <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;57928212-72157629836236274&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Misc&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre>, <pre>&quot;iconlarge&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;/images/collection_default_l.gif&quot;</kbd></pre>, <pre>&quot;iconsmall&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;/images/collection_default_s.gif&quot;</kbd></pre> }</pre>, <kbd style="color:white">[1] </kbd><pre>{ <pre>&quot;collection&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre>[ <kbd style="color:white">[0] </kbd><pre>{ <pre>&quot;set&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre>[ <kbd style="color:white">[ 0] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629683535562&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 1 - Hollywood Tour and Santa Monica Pier&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 1] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629683541696&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 2 - Drive to Bay Area&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 2] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629683554852&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 3 - Six Flags Discovery Kingdom&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 3] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629710465912&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 4 - Gilroy Gardens &amp; Santa Cruz Beach Boardwalk&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 4] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629710474644&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 5 - California's Great America &amp; Long Drive South&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 5] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629710489442&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 6 - Six Flags Magic Mountain&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 6] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629834618028&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 7 - Universal Studios Hollywood &amp; Scandia Amusement Park &amp; John's Incredible Pizza&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 7] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629834637138&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 8 - Sea World San Diego &amp; Belmont Park&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 8] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629836419418&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 9 - Legoland California &amp; Castle Amusement Park&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 9] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629851123596&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 10 - Knott's Berry Farm &amp; Adventure City&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[10] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629851700916&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 11 &amp; 12 - Disneyland Resort&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[11] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629851713058&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 13,14 &amp; 15 - Las Vegas&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre> ]</pre>, <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;57928212-72157629691182748&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;West Coast Tour 2009&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre>, <pre>&quot;iconlarge&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;/images/collection_default_l.gif&quot;</kbd></pre>, <pre>&quot;iconsmall&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;/images/collection_default_s.gif&quot;</kbd></pre> }</pre>, <kbd style="color:white">[1] </kbd><pre>{ <pre>&quot;set&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre>[ <kbd style="color:white">[ 0] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629866337538&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 0 - Arrival and Mall of America&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 1] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629868655454&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 1 - Mall of America&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 2] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629970737598&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 2 - Adventureland and Worlds of Fun&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 3] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630011649024&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 3 - Worlds of Fun&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 4] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630034790528&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 4 - Silver Dollar City&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 5] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630035520246&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 5 - St Louis Arch and City Museum&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 6] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630043090072&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 6 - Six Flags St Louis&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 7] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630043098290&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 7 - Holiday World&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 8] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630048416804&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 8 - Indiana Beach&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 9] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630048431390&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 9 - Six Flags Great America&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[10] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157629997482351&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 10 - Mount Olympus, Timber Falls and Knuckleheads&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[11] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630059600702&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 11 - Valleyfair&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre> ]</pre>, <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;57928212-72157629866347760&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Middle America Tour 2010&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre>, <pre>&quot;iconlarge&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;/images/collection_default_l.gif&quot;</kbd></pre>, <pre>&quot;iconsmall&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;/images/collection_default_s.gif&quot;</kbd></pre> }</pre>, <kbd style="color:white">[2] </kbd><pre>{ <pre>&quot;set&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre>[ <kbd style="color:white">[0] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157631693409808&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 1 - Great Wall of China, Tiananmen Square, Forbidden City&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[1] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630657898798&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 1 - Carowinds&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[2] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630692436584&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 2 - Dollywood&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[3] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630699845912&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 3 - Random Pigeon Forge Activities&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[4] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630714758818&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 4 - Long Drive to Williamsburg&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[5] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630717785454&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 5 - Busch Gardens Williamsburg&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[6] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157630717785576&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 6 - Kings Dominion&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre> ]</pre>, <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;57928212-72157630658165668&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;IntimidaTOUR 2010&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre>, <pre>&quot;iconlarge&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;/images/collection_default_l.gif&quot;</kbd></pre>, <pre>&quot;iconsmall&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;/images/collection_default_s.gif&quot;</kbd></pre> }</pre>, <kbd style="color:white">[3] </kbd><pre>{ <pre>&quot;set&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre>[ <kbd style="color:white">[ 0] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157631693011733&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 0 - Early Arrival Day, Crab Island Childrens Amusement Park, Crab Island Amusement Park, Aoyun Fuwa Eden, Beijing World Park&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 1] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157631693409808&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 1 - Great Wall of China, Tiananmen Square, Forbidden City&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 2] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157631698474564&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 2 - Shijingshan Amusement Park, Sun Park&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 3] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157631703216195&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 3 - Happy Valley Beijing and visit to 2008 Olympic Park&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 4] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157631713251068&quot;</kbd></pre>, <pre>&quot;title&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;Day 4 - Victory Kingdom, Children's Palace, Langfang&quot;</kbd></pre>, <pre>&quot;description&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;&quot;</kbd></pre> }</pre>, <kbd style="color:white">[ 5] </kbd><pre>{ <pre>&quot;id&quot;</pre><kbd style="color:slategray"> =&gt; </kbd><pre><kbd style="color:brown">&quot;72157631761492087&quot;</kbd></pre>, <pre>&quot;title&quot;</pre>

I can;t add the rest of the output as I can only use 30,000 characters in this box. The above is the first part of the output.

If I add a raw call infront of ap, then it does help but it outputs each string, hash arrow and curly brace/square brace on a new line which is no use whatsoever.

I would appreciate this question being reopened.

2

There are 2 best solutions below

2
On
1
On

You're trying to print this in a view? Have you tried

ap(@flickr_collections, :html => true)