only enable ragel dtext for user 1
This commit is contained in:
@@ -50,11 +50,19 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def format_text(text, options = {})
|
def format_text(text, options = {})
|
||||||
raw(DTextRagel.parse(text))
|
if CurrentUser.id == 1
|
||||||
|
raw(DTextRagel.parse(text))
|
||||||
|
else
|
||||||
|
DText.parse(text)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def strip_dtext(text)
|
def strip_dtext(text, options = {})
|
||||||
raw(DTextRagel.parse_strip(text))
|
if CurrentUser.id == 1
|
||||||
|
raw(DTextRagel.parse_strip(text))
|
||||||
|
else
|
||||||
|
DText.parse_strip(text)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def error_messages_for(instance_name)
|
def error_messages_for(instance_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user