Skip to content

Instantly share code, notes, and snippets.

@peterhellberg
Created June 29, 2012 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterhellberg/3018183 to your computer and use it in GitHub Desktop.
Save peterhellberg/3018183 to your computer and use it in GitHub Desktop.
Yajl partials in Sinatra (using Tilt)
# An extremely hackish solution
module Sinatra
module Templates
def yajl_partial(template, locals={})
Yajl::Parser.parse yajl(template, {}, locals)
end
end
end
# I’ll add a better solution when I figure something out :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment