DEV: Use short_date helper for email post template (#10063)

This commit is contained in:
Penar Musaraj
2020-06-17 11:29:37 -04:00
committed by GitHub
parent e29afa200a
commit 76b05ef8ad
2 changed files with 1 additions and 9 deletions

View File

@@ -174,14 +174,6 @@ class UserNotifications < ActionMailer::Base
)
end
def short_date(dt)
if dt.year == Time.now.year
I18n.l(dt, format: :short_no_year)
else
I18n.l(dt, format: :date_only)
end
end
def digest(user, opts = {})
build_summary_for(user)
min_date = opts[:since] || user.last_emailed_at || user.last_seen_at || 1.month.ago