comparison app/views/tweets/_tweet.html.erb @ 126:c9864cf35950

Now with explicit alt text
author nanaya <me@nanaya.pro>
date Wed, 30 Aug 2017 14:52:25 +0900
parents 61414d0a367b
children d4b2bd9e23f5
comparison
equal deleted inserted replaced
125:61414d0a367b 126:c9864cf35950
17 %> 17 %>
18 </p> 18 </p>
19 19
20 <p> 20 <p>
21 <%= link_to "https://twitter.com/#{tweet.user.screen_name}" do %> 21 <%= link_to "https://twitter.com/#{tweet.user.screen_name}" do %>
22 <%= image_tag tweet.user.profile_image_url_https %> 22 <%= image_tag tweet.user.profile_image_url_https, :alt => "profile image for #{tweet.user.name.printable}" %>
23 <%= tweet.user.name.printable -%> 23 <%= tweet.user.name.printable -%>
24 <% end %> 24 <% end %>
25 </p> 25 </p>
26 26
27 <p> 27 <p>
28 <% tweet.media.each do |media| %> 28 <% tweet.media.each_with_index do |media, i| %>
29 <% if media.is_a? Twitter::Media::Photo %> 29 <% if media.is_a? Twitter::Media::Photo %>
30 <%= link_to "#{media.media_url_https}:orig" do %> 30 <%= link_to "#{media.media_url_https}:orig" do %>
31 <%= image_tag "#{media.media_url_https}:small" -%> 31 <%= image_tag "#{media.media_url_https}:small", :alt => "attachment #{i + 1}" -%>
32 <% end %> 32 <% end %>
33 <% end %> 33 <% end %>
34 <% end %> 34 <% end %>
35 </p> 35 </p>
36 36