rails: fix #to_s(:human_size) deprecation warnings.

Fix this deprecation warning:

  DEPRECATION WARNING: Integer#to_s(:human_size) is deprecated. Please use Integer#to_formatted_s(:human_size) instead.
This commit is contained in:
evazion
2022-01-06 00:38:52 -06:00
parent 3f25ad6dce
commit a26ed9d389
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,7 @@
<% if upload.post.present? %>
<span class="info">
<strong>Size</strong>
<%= link_to "#{upload.post.file_size.to_s(:human_size, precision: 4)} #{upload.post.file_ext}", upload.post.file_url %>
<%= link_to "#{upload.post.file_size.to_formatted_s(:human_size, precision: 4)} #{upload.post.file_ext}", upload.post.file_url %>
(<%= upload.post.image_width %>x<%= upload.post.image_height %>)
</span>
<% end %>