Skip to content

Instantly share code, notes, and snippets.

@elarkin
Created June 27, 2013 17:05
Show Gist options
  • Save elarkin/5878263 to your computer and use it in GitHub Desktop.
Save elarkin/5878263 to your computer and use it in GitHub Desktop.
def render_message(template, phone)
url_split_thang = UrlShrotenerClient.tokenize(template)
url_split_thang.map do |obj|
if obj.url?
template = Liquid::Template.parse(obj.template)
edit(template).render(message_variable_values(phone), filters: [LiquidFilters])
else
Liquid::Template.parse(obj.template).render...
end
end.join("")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment