DEV: Move distance_of_time_in_words/time_ago_in_words (#21745)

It wasn't a patch (just two helper functions that were called directly) and no longer has much to do with "Rails 4"
This commit is contained in:
Jarek Radosz
2023-05-25 14:53:59 +02:00
committed by GitHub
parent bd742de0b7
commit 036e27e69a
6 changed files with 108 additions and 92 deletions

View File

@@ -115,7 +115,7 @@ class Admin::UsersController < Admin::StaffController
"user.already_suspended",
staff: suspend_record.acting_user.username,
time_ago:
FreedomPatches::Rails4.time_ago_in_words(
AgeWords.time_ago_in_words(
suspend_record.created_at,
true,
scope: :"datetime.distance_in_words_verbose",
@@ -368,7 +368,7 @@ class Admin::UsersController < Admin::StaffController
"user.already_silenced",
staff: silenced_record.acting_user.username,
time_ago:
FreedomPatches::Rails4.time_ago_in_words(
AgeWords.time_ago_in_words(
silenced_record.created_at,
true,
scope: :"datetime.distance_in_words_verbose",

View File

@@ -36,7 +36,7 @@ class ComposerMessagesController < ApplicationController
user_count: user_count,
usernames: users,
time_ago:
FreedomPatches::Rails4.time_ago_in_words(
AgeWords.time_ago_in_words(
SiteSetting.pm_warn_user_last_seen_months_ago.month.ago,
true,
scope: :"datetime.distance_in_words_verbose",