FIX: Don't sort the new topics by score since the Top logic is already

sorting them by score.
This commit is contained in:
Robin Ward
2014-04-17 15:43:24 -04:00
parent 564b1d86b0
commit fd4007eefc
2 changed files with 2 additions and 5 deletions

View File

@ -47,11 +47,7 @@ class UserNotifications < ActionMailer::Base
if @featured_topics.present?
@featured_topics, @new_topics = @featured_topics[0..4], @featured_topics[5..-1]
# Sort the new topics by score
@new_topics.sort! {|a, b| (b.score || 0) - (a.score || 0) } if @new_topics.present?
@markdown_linker = MarkdownLinker.new(Discourse.base_url)
build_email user.email,
from_alias: I18n.t('user_notifications.digest.from', site_name: SiteSetting.title),
subject: I18n.t('user_notifications.digest.subject_template',