真棒打印Ruby哈希

时间:2013-02-19 22:24:06

标签: ruby-on-rails output awesomeprint

我正在尝试输出一个散列,这是调用Flickr的collection.getTree方法的结果。

我有:

ap @flickr_collections

它打印出哈希,但周围有所有转义的html标签。我怎么能解决这个问题呢。我确实尝试了.html_safe,但它没有用。

基本上我只想要这个哈希的漂亮打印输出。更不用说了。

更新:

这就是我正在运行的内容:= ap(@flickr_collections, html: true)

,输出为:

<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>

我可以添加其余的输出,因为我在这个框中只能使用30,000个字符。以上是输出的第一部分。

如果我在ap前面添加一个原始调用,那么它确实有帮助,但它会在新行上输出每个字符串,哈希箭头和大括号/方括号,这是无用的。

我希望重新开启这个问题。

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

你想在视图中打印这个吗?你试过吗

ap(@flickr_collections, :html => true)