require dtext correctly

This commit is contained in:
r888888888
2016-03-17 15:14:08 -07:00
parent b24ab33109
commit 0ab1c9f9f5
3 changed files with 6 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
require 'dtext'
module ApplicationHelper
def wordbreakify(string)
lines = string.scan(/.{1,10}/)
@@ -48,11 +50,11 @@ module ApplicationHelper
end
def format_text(text, options = {})
DTextRagel.parse(text)
raw(DTextRagel.parse(text))
end
def strip_dtext(text)
DTextRagel.parse_strip(text)
raw(DTextRagel.parse_strip(text))
end
def error_messages_for(instance_name)