allow page blocks to add instance vars

This commit is contained in:
Thomas Reynolds 2011-07-21 16:55:18 -07:00
parent e97af242bc
commit d53bac226e

View file

@ -48,9 +48,11 @@ module Middleman::CoreExtensions::Routing
options[:layout] = settings.layout if options[:layout].nil?
has_block = block_given?
paths.each do |p|
get(p) do
return yield if block_given?
instance_eval(&block) if has_block
process_request(options)
end
end