From: Andy Allan Date: Wed, 15 Nov 2023 19:18:01 +0000 (+0000) Subject: Avoid wrapping time tags in abbr for note_helper X-Git-Tag: live~955^2~7 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/d739943b36901ed30d8a715e113fb0a34b14d2e4?ds=sidebyside Avoid wrapping time tags in abbr for note_helper --- diff --git a/app/helpers/note_helper.rb b/app/helpers/note_helper.rb index 42fd089e4..4e7e37bfb 100644 --- a/app/helpers/note_helper.rb +++ b/app/helpers/note_helper.rb @@ -4,12 +4,10 @@ module NoteHelper def note_event(event, at, by) if by.nil? t("notes.show.event_#{event}_by_anonymous_html", - :time_ago => tag.abbr(friendly_date_ago(at), - :title => l(at))) + :time_ago => friendly_date_ago(at)) else t("notes.show.event_#{event}_by_html", - :time_ago => tag.abbr(friendly_date_ago(at), - :title => l(at)), + :time_ago => friendly_date_ago(at), :user => note_author(by)) end end diff --git a/test/helpers/note_helper_test.rb b/test/helpers/note_helper_test.rb index 805906d55..4f36f9175 100644 --- a/test/helpers/note_helper_test.rb +++ b/test/helpers/note_helper_test.rb @@ -8,8 +8,8 @@ class NoteHelperTest < ActionView::TestCase date = Time.utc(2014, 3, 5, 21, 37, 45) user = create(:user) - assert_match %r{^Created by anonymous $}, note_event("opened", date, nil) - assert_match %r{^Resolved by #{user.display_name} $}, note_event("closed", date, user) + assert_match %r{^Created by anonymous $}, note_event("opened", date, nil) + assert_match %r{^Resolved by #{user.display_name} $}, note_event("closed", date, user) end def test_note_author