about summary refs log tree commit diff
path: root/app/views/tags/show.rss.ruby
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-03-04 18:33:52 -0500
committerGitHub <noreply@github.com>2023-03-05 00:33:52 +0100
commit82a6cf401244e0cc51bb5fa2aa20e58b9996a640 (patch)
tree4c2fa5eb0bbe73bf320b560a4eedc5155ff39df6 /app/views/tags/show.rss.ruby
parent14f0b48fb60fec103d3b95d5f1cd4880a41c1a42 (diff)
Enable Rubocop for app/views (#23874)
Diffstat (limited to 'app/views/tags/show.rss.ruby')
-rw-r--r--app/views/tags/show.rss.ruby12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/views/tags/show.rss.ruby b/app/views/tags/show.rss.ruby
index 8e0c2327b..bbda1ad4b 100644
--- a/app/views/tags/show.rss.ruby
+++ b/app/views/tags/show.rss.ruby
@@ -3,7 +3,7 @@ RSS::Builder.build do |doc|
   doc.description(I18n.t('rss.descriptions.tag', hashtag: @tag.display_name))
   doc.link(tag_url(@tag))
   doc.last_build_date(@statuses.first.created_at) if @statuses.any?
-  doc.generator("Mastodon v#{Mastodon::Version.to_s}")
+  doc.generator("Mastodon v#{Mastodon::Version}")
 
   @statuses.each do |status|
     doc.item do |item|
@@ -16,12 +16,12 @@ RSS::Builder.build do |doc|
         item.enclosure(full_asset_url(media.file.url(:original, false)), media.file.content_type, media.file.size)
       end
 
-      status.ordered_media_attachments.each do |media|
-        item.media_content(full_asset_url(media.file.url(:original, false)), media.file.content_type, media.file.size) do |media_content|
-          media_content.medium(media.gifv? ? 'image' : media.type.to_s)
+      status.ordered_media_attachments.each do |media_attachment|
+        item.media_content(full_asset_url(media_attachment.file.url(:original, false)), media_attachment.file.content_type, media_attachment.file.size) do |media_content|
+          media_content.medium(media_attachment.gifv? ? 'image' : media_attachment.type.to_s)
           media_content.rating(status.sensitive? ? 'adult' : 'nonadult')
-          media_content.description(media.description) if media.description.present?
-          media_content.thumbnail(media.thumbnail.url(:original, false)) if media.thumbnail?
+          media_content.description(media_attachment.description) if media_attachment.description.present?
+          media_content.thumbnail(media_attachment.thumbnail.url(:original, false)) if media_attachment.thumbnail?
         end
       end