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

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

diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb
index 184c62b..62525ee 100644
--- a/app/mailers/user_notifications.rb
+++ b/app/mailers/user_notifications.rb
@@ -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
diff --git a/app/views/email/_post.html.erb b/app/views/email/_post.html.erb
index e83b841..5750753 100644
--- a/app/views/email/_post.html.erb
+++ b/app/views/email/_post.html.erb
@@ -20,7 +20,7 @@
           <span class='user-title'><%= post.user.title %></span>
         <% end %>
         <br>
-        <span class='notification-date'><%= l post.created_at, format: :short_no_year %></span>
+        <span class='notification-date'><%= short_date(post.created_at) %></span>
       </td>
     </tr>
   </table>

GitHub sha: 76b05ef8

This commit appears in #10063 which was approved by eviltrout and ZogStriP. It was merged by pmusaraj.