From 0777efe74ddc6a794213eee7ae4364e14c3082f0 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 7 Nov 2014 17:16:52 -0500 Subject: [PATCH] FIX: 1000 was a crazy threshold for showing categories at the bottom of digests --- app/mailers/user_notifications.rb | 2 +- app/views/user_notifications/digest.html.erb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb index 476a0903924..9192ea6e7c4 100644 --- a/app/mailers/user_notifications.rb +++ b/app/mailers/user_notifications.rb @@ -54,7 +54,7 @@ class UserNotifications < ActionMailer::Base featured_topic_ids = @featured_topics.map(&:id) @new_topics_since_seen = Topic.new_since_last_seen(user, min_date, featured_topic_ids).count - if @new_topics_since_seen > 1000 + if @new_topics_since_seen > SiteSetting.digest_topics category_counts = Topic.new_since_last_seen(user, min_date, featured_topic_ids).group(:category_id).count @new_by_category = [] diff --git a/app/views/user_notifications/digest.html.erb b/app/views/user_notifications/digest.html.erb index 980806f1708..9cd96523049 100644 --- a/app/views/user_notifications/digest.html.erb +++ b/app/views/user_notifications/digest.html.erb @@ -56,7 +56,9 @@

<%= t('user_notifications.digest.more_topics_category', last_seen_at: @last_seen_at, new_topics_since_seen: @new_topics_since_seen) %>

<%- @new_by_category.each do |c| %> - <%= email_category(c[0], show_uncategorized: true) %> x <%= c[1] %> + + <%= c[0].name %> <%= c[1] %> + <%- end %>
<%- else %>