Small email fixes
This commit is contained in:
parent
bf2663346a
commit
8b4c030c16
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue