Make markdown helper safer to use

Avoid exception if text is nil
This commit is contained in:
Amaia Castro
2017-01-03 21:41:00 +01:00
parent d2b3a21182
commit 3ba6b409aa

View File

@@ -18,6 +18,8 @@ module ApplicationHelper
end
def markdown(text)
return text if text.blank?
# See https://github.com/vmg/redcarpet for options
render_options = {
filter_html: false,