Attempt fix for #1506

This commit is contained in:
Thomas Reynolds 2015-05-07 09:01:04 -07:00
parent 588f42f1df
commit 70dd18e8f1
2 changed files with 2 additions and 2 deletions

View file

@ -300,7 +300,7 @@ module Middleman
end
# Render using Tilt
content = template.render(context, locs, &block)
content = template.render(context || ::Object.new, locs, &block)
# Allow hooks to manipulate the result after render
self.class.callbacks_for_hook(:after_render).each do |callback|

View file

@ -90,7 +90,7 @@ module Middleman
# Render a template with the given name and locals
def template(template_name, locals={})
template_path = File.join(File.dirname(__FILE__), 'meta_pages', 'templates', template_name)
content = Tilt.new(template_path).render(nil, locals)
content = Tilt.new(template_path).render(::Object.new, locals)
response(content)
end