From: Tom Hughes Date: Sat, 5 Jun 2021 06:40:55 +0000 (+0100) Subject: Fix erblint warnings X-Git-Tag: live~1594 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/2c5e981684defe603e9c579a2e59dedf30dc9745 Fix erblint warnings --- diff --git a/app/views/browse/_common_details.html.erb b/app/views/browse/_common_details.html.erb index 3748f2f65..356207754 100644 --- a/app/views/browse/_common_details.html.erb +++ b/app/views/browse/_common_details.html.erb @@ -4,7 +4,7 @@

- <% if common_details.changeset.tags['comment'].present? %> + <% if common_details.changeset.tags["comment"].present? %> <%= linkify(common_details.changeset.tags["comment"]) %> <% else %> <%= t "browse.no_comment" %> @@ -13,7 +13,7 @@

<%= t "browse.#{common_details.visible? ? :edited : :deleted}_by_html", - :time => time_ago_in_words(common_details.timestamp, :scope => :'datetime.distance_in_words_ago'), + :time => time_ago_in_words(common_details.timestamp, :scope => :"datetime.distance_in_words_ago"), :user => changeset_user_link(common_details.changeset), :title => l(common_details.timestamp) %> · diff --git a/app/views/diary_entries/comments.html.erb b/app/views/diary_entries/comments.html.erb index 290fba35e..5f08f8d30 100644 --- a/app/views/diary_entries/comments.html.erb +++ b/app/views/diary_entries/comments.html.erb @@ -17,7 +17,7 @@ <% @comments.each do |comment| -%> "> <%= link_to comment.diary_entry.title, diary_entry_path(comment.diary_entry.user, comment.diary_entry) %> - <%= time_ago_in_words(comment.created_at, :scope => :'datetime.distance_in_words_ago') %> + <%= time_ago_in_words(comment.created_at, :scope => :"datetime.distance_in_words_ago") %> <%= comment.body.to_html %> <% end -%> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 9fd8f1167..0aa9fea50 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -62,10 +62,10 @@ <% if issue.user_updated %> <%= t ".last_updated_time_user_html", :user => link_to(issue.user_updated.display_name, user_path(issue.user_updated)), - :time => time_ago_in_words(issue.updated_at, :scope => :'datetime.distance_in_words_ago'), + :time => time_ago_in_words(issue.updated_at, :scope => :"datetime.distance_in_words_ago"), :title => l(issue.updated_at) %> <% else %> - <%= t ".last_updated_time_html", :time => time_ago_in_words(issue.updated_at, :scope => :'datetime.distance_in_words_ago'), + <%= t ".last_updated_time_html", :time => time_ago_in_words(issue.updated_at, :scope => :"datetime.distance_in_words_ago"), :title => l(issue.updated_at) %> <% end %> diff --git a/app/views/traces/_trace.html.erb b/app/views/traces/_trace.html.erb index 7dc20c203..44de2ef06 100644 --- a/app/views/traces/_trace.html.erb +++ b/app/views/traces/_trace.html.erb @@ -30,7 +30,7 @@

- <%= time_ago_in_words(trace.timestamp, :scope => :'datetime.distance_in_words_ago') %> + <%= time_ago_in_words(trace.timestamp, :scope => :"datetime.distance_in_words_ago") %> <%= t ".by" %> <%= link_to trace.user.display_name, user_path(trace.user) %> <% if !trace.tags.empty? %> diff --git a/app/views/user_blocks/revoke.html.erb b/app/views/user_blocks/revoke.html.erb index 1899e5145..9ece75bb5 100644 --- a/app/views/user_blocks/revoke.html.erb +++ b/app/views/user_blocks/revoke.html.erb @@ -28,6 +28,6 @@ <% else %>

- <%= t(".past", :time => time_ago_in_words(@user_block.ends_at, :scope => :'datetime.distance_in_words_ago')) %> + <%= t(".past", :time => time_ago_in_words(@user_block.ends_at, :scope => :"datetime.distance_in_words_ago")) %>

<% end %> diff --git a/app/views/users/_contact.html.erb b/app/views/users/_contact.html.erb index a5b29411c..c7e10c060 100644 --- a/app/views/users/_contact.html.erb +++ b/app/views/users/_contact.html.erb @@ -21,7 +21,7 @@

<% changeset = contact.changesets.first %> <% if changeset %> - <%= t("users.show.latest edit", :ago => time_ago_in_words(changeset.created_at, :scope => :'datetime.distance_in_words_ago')) %> + <%= t("users.show.latest edit", :ago => time_ago_in_words(changeset.created_at, :scope => :"datetime.distance_in_words_ago")) %> <% comment = changeset.tags["comment"].to_s == "" ? t("browse.no_comment") : changeset.tags["comment"] %> <%= link_to(comment, { :controller => "browse", :action => "changeset", :id => changeset.id },