comparison app/views/tweets/_tweet.html.erb @ 62:9ab79a764434

Sweet tweet media viewer (image only for now)
author nanaya <me@myconan.net>
date Tue, 01 Dec 2015 01:08:37 +0900
parents
children a20bbd1e2dc1
comparison
equal deleted inserted replaced
61:0d665b51442d 62:9ab79a764434
1 <%= auto_link(tweet.text).html_safe %>
2
3 <p>
4 <% tweet.media.each do |media| %>
5 <% if media.is_a? Twitter::Media::Photo %>
6 <%= link_to "#{media.media_url_https}:orig" do %>
7 <%= image_tag "#{media.media_url_https}:small" -%>
8 <% end %>
9 <% end %>
10 <% end %>
11 </p>
12
13 <% if tweet.quoted_status.present? %>
14 <blockquote>
15 <%= render "tweet", :tweet => tweet.quoted_status %>
16 </blockquote>
17 <% end %>