OSDN Git Service

added nico_thumb
authornomeu <nomeu@users.sourceforge.jp>
Sun, 27 Jun 2010 09:46:06 +0000 (18:46 +0900)
committernomeu <nomeu@users.sourceforge.jp>
Sun, 27 Jun 2010 09:46:06 +0000 (18:46 +0900)
app/helpers/thumbs_helper.rb
app/views/thumbs/show.html.erb

index 8cdeb2e..1abf677 100644 (file)
@@ -1,2 +1,5 @@
 module ThumbsHelper
+  def nico_thumb(video_id)
+    content_tag 'iframe', '', :src => "http://ext.nicovideo.jp/thumb/" + u(video_id), :width => 312, :height => 180, :scrolling => "no", :frameborder => 0
+  end
 end
index 8eeded7..c521bcd 100644 (file)
@@ -13,6 +13,8 @@
   <%=h @thumb.description %>
 </p>
 
+<%= nico_thumb(@thumb.video_id) %>
+
 <%-unless @thumb.arcs.empty?-%>
 <p>
   <b><%= _'Thumb|Arcs' %>:</b>