only enable ragel dtext for user 1

This commit is contained in:
r888888888
2016-04-25 16:27:01 -07:00
parent 7576377fd8
commit 641250d2a9

View File

@@ -50,11 +50,19 @@ module ApplicationHelper
end
def format_text(text, options = {})
raw(DTextRagel.parse(text))
if CurrentUser.id == 1
raw(DTextRagel.parse(text))
else
DText.parse(text)
end
end
def strip_dtext(text)
raw(DTextRagel.parse_strip(text))
def strip_dtext(text, options = {})
if CurrentUser.id == 1
raw(DTextRagel.parse_strip(text))
else
DText.parse_strip(text)
end
end
def error_messages_for(instance_name)