mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
allow page blocks to add instance vars
This commit is contained in:
parent
e97af242bc
commit
d53bac226e
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue