comparison app/views/pastes/show.html.erb @ 420:bec47da9052a

Prevent explosion on nil language
author nanaya <me@myconan.net>
date Thu, 17 Sep 2015 18:12:38 +0900
parents a69dd2d37950
children 967233b26404
comparison
equal deleted inserted replaced
419:e34e0de34b65 420:bec47da9052a
24 <div role="tabpanel" class="tab-pane active" id="pl"> 24 <div role="tabpanel" class="tab-pane active" id="pl">
25 <pre class="paste-show__content"><code class="js-paste-pl"><%= @paste.paste %></code></pre> 25 <pre class="paste-show__content"><code class="js-paste-pl"><%= @paste.paste %></code></pre>
26 </div> 26 </div>
27 27
28 <div role="tabpanel" class="tab-pane" id="hl"> 28 <div role="tabpanel" class="tab-pane" id="hl">
29 <pre class="paste-show__content"><code class="js-paste-hl zp-hl lang-<%= @paste.language.parameterize %>"></code></pre> 29 <pre class="paste-show__content"><code class="js-paste-hl zp-hl lang-<%= @paste.language.try(:parameterize) %>"></code></pre>
30 </div> 30 </div>
31 31
32 <div role="tabpanel" class="tab-pane" id="md"> 32 <div role="tabpanel" class="tab-pane" id="md">
33 <div class="js-paste-md"></div> 33 <div class="js-paste-md"></div>
34 </div> 34 </div>