Small email fixes

This commit is contained in:
Robin Ward 2013-12-03 10:10:53 -05:00
parent bf2663346a
commit 8b4c030c16
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class UserNotifications < ActionMailer::Base
@featured_topics, @new_topics = @featured_topics[0..4], @featured_topics[5..-1] @featured_topics, @new_topics = @featured_topics[0..4], @featured_topics[5..-1]
# Sort the new topics by score # Sort the new topics by score
@new_topics.sort! {|a, b| b.score - a.score } if @new_topics.present? @new_topics.sort! {|a, b| (b.score || 0) - (a.score || 0) } if @new_topics.present?
@markdown_linker = MarkdownLinker.new(Discourse.base_url) @markdown_linker = MarkdownLinker.new(Discourse.base_url)

View File

@ -28,7 +28,7 @@ module Email
end end
# ensure no schemaless urls # ensure no schemaless urls
if img['src'].starts_with?("//") if img['src'] && img['src'].starts_with?("//")
img['src'] = "http:" + img['src'] img['src'] = "http:" + img['src']
end end
end end