comparison app/views/tweets/_tweet.html.erb @ 103:1251b3d6ec5d

Use included url data instead of expanding using embiggen
author nanaya <me@myconan.net>
date Mon, 26 Sep 2016 02:39:40 +0900
parents c1d5d8be92c6
children 61414d0a367b
comparison
equal deleted inserted replaced
102:f4805ac41656 103:1251b3d6ec5d
5 5
6 <%= render "tweet", :tweet => tweet.retweeted_status %> 6 <%= render "tweet", :tweet => tweet.retweeted_status %>
7 <% else%> 7 <% else%>
8 <p> 8 <p>
9 <%# FIXME: Twitter gem doesn't support extended mode when writing this %> 9 <%# FIXME: Twitter gem doesn't support extended mode when writing this %>
10 <%= auto_link(expand_url(tweet.to_hash[:full_text])).gsub("\n", "<br>").html_safe %> 10 <%= auto_link(expand_url(
11 tweet.attrs[:full_text],
12 tweet.attrs[:entities][:urls],
13 tweet.attrs[:entities][:media]
14 ))
15 .gsub("\n", "<br>")
16 .html_safe
17 %>
11 </p> 18 </p>
12 19
13 <p> 20 <p>
14 <%= link_to "https://twitter.com/#{tweet.user.screen_name}" do %> 21 <%= link_to "https://twitter.com/#{tweet.user.screen_name}" do %>
15 <%= image_tag tweet.user.profile_image_url_https %> 22 <%= image_tag tweet.user.profile_image_url_https %>