Attempt fix for #1506
This commit is contained in:
parent
588f42f1df
commit
70dd18e8f1
|
@ -300,7 +300,7 @@ module Middleman
|
||||||
end
|
end
|
||||||
|
|
||||||
# Render using Tilt
|
# 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
|
# Allow hooks to manipulate the result after render
|
||||||
self.class.callbacks_for_hook(:after_render).each do |callback|
|
self.class.callbacks_for_hook(:after_render).each do |callback|
|
||||||
|
|
|
@ -90,7 +90,7 @@ module Middleman
|
||||||
# Render a template with the given name and locals
|
# Render a template with the given name and locals
|
||||||
def template(template_name, locals={})
|
def template(template_name, locals={})
|
||||||
template_path = File.join(File.dirname(__FILE__), 'meta_pages', 'templates', template_name)
|
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)
|
response(content)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue