Skip to content

Instantly share code, notes, and snippets.

@peterhellberg
Created June 29, 2012 14:11
Show Gist options
  • Select an option

  • Save peterhellberg/3018183 to your computer and use it in GitHub Desktop.

Select an option

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