rails: fix deprecated #to_s(:format) method.
Fix this deprecation:
Deprecate passing a format to #to_s in favor of #to_formatted_s in
Array, Range, Date, DateTime, Time, BigDecimal, Float and, Integer.
https://guides.rubyonrails.org/7_0_release_notes.html#active-support-deprecations
This commit is contained in:
@@ -45,13 +45,13 @@
|
||||
<dt>Original Size</dt>
|
||||
<dd>
|
||||
<%= post_replacement.old_image_width %>x<%= post_replacement.old_image_height %>
|
||||
(<%= post_replacement.old_file_size.to_s(:human_size, precision: 4) %>, <%= post_replacement.old_file_ext %>)
|
||||
(<%= post_replacement.old_file_size.to_formatted_s(:human_size, precision: 4) %>, <%= post_replacement.old_file_ext %>)
|
||||
</dd>
|
||||
|
||||
<dt>Replacement Size</dt>
|
||||
<dd>
|
||||
<%= post_replacement.image_width %>x<%= post_replacement.image_height %>
|
||||
(<%= post_replacement.file_size.to_s(:human_size, precision: 4) %>, <%= post_replacement.file_ext %>)
|
||||
(<%= post_replacement.file_size.to_formatted_s(:human_size, precision: 4) %>, <%= post_replacement.file_ext %>)
|
||||
</dd>
|
||||
</dl>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user