{"action":"created","issue":{"url":"https://api.github.com/repos/middleman/middleman/issues/1111","labels_url":"https://api.github.com/repos/middleman/middleman/issues/1111/labels{/name}","comments_url":"https://api.github.com/repos/middleman/middleman/issues/1111/comments","events_url":"https://api.github.com/repos/middleman/middleman/issues/1111/events","html_url":"https://github.com/middleman/middleman/issues/1111","id":23907882,"number":1111,"title":"Proxied local variables are not available within the outer layout when `wrap_layout` is used","user":{"login":"lolmaus","id":200884,"avatar_url":"https://avatars.githubusercontent.com/u/200884?v=3","gravatar_id":"","url":"https://api.github.com/users/lolmaus","html_url":"https://github.com/lolmaus","followers_url":"https://api.github.com/users/lolmaus/followers","following_url":"https://api.github.com/users/lolmaus/following{/other_user}","gists_url":"https://api.github.com/users/lolmaus/gists{/gist_id}","starred_url":"https://api.github.com/users/lolmaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lolmaus/subscriptions","organizations_url":"https://api.github.com/users/lolmaus/orgs","repos_url":"https://api.github.com/users/lolmaus/repos","events_url":"https://api.github.com/users/lolmaus/events{/privacy}","received_events_url":"https://api.github.com/users/lolmaus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2013-12-07T16:47:22Z","updated_at":"2015-06-12T11:55:04Z","closed_at":"2015-03-02T02:16:34Z","body":"## Prerequisites\r\n\r\nSo we have two layouts.\r\n\r\nThe master layout accesses a local variable `title`:\r\n\r\n**/soucre/layouts/layout.haml**\r\n\r\n```haml\r\n%h1= title\r\n= yield\r\n```\r\n\r\nAnother layout is wrapped by the master layout.\r\n\r\n**/soucre/layouts/inner_layout.haml**\r\n\r\n```haml\r\n- wrap_layout :layout do\r\n  = yield\r\n  %h3 Goodbye.\r\n```\r\n\r\nA proxy page is created and a local variable is passed into it.\r\n\r\n**/config.rb**\r\n\r\n```ruby\r\nproxy \"/proxy.html\", \"/prototype.html\", locals: {title: 'Hello old friend'}\r\n```\r\n\r\n## Working scenario\r\n\r\nWhen a page is rendered with a master layout directly, the local variable is rendered fine.\r\n\r\n**/soucre/prototype.html.haml**\r\n\r\n```haml\r\n%p Yay!\r\n```\r\n\r\n**http://localhost:4567/proxy.html**\r\n\r\n```html\r\n<h1>Hello old friend</h1>\r\n<p>Yay!</p>\r\n```\r\n\r\n## Failing scenario\r\n\r\nBut when the master layout is rendered via `wrap_layout`, the local variable is not accessible.\r\n\r\n**/soucre/prototype.html.haml**\r\n\r\n```haml\r\n---\r\nlayout: inner_layout\r\n---\r\n\r\n%p Yay!\r\n```\r\n\r\n**http://localhost:4567/proxy.html**\r\n\r\n    undefined local variable or method `title' for #<Middleman::Application:0x31448736>\r\n"},"comment":{"url":"https://api.github.com/repos/middleman/middleman/issues/comments/111467785","html_url":"https://github.com/middleman/middleman/issues/1111#issuecomment-111467785","issue_url":"https://api.github.com/repos/middleman/middleman/issues/1111","id":111467785,"user":{"login":"huerlisi","id":11375,"avatar_url":"https://avatars.githubusercontent.com/u/11375?v=3","gravatar_id":"","url":"https://api.github.com/users/huerlisi","html_url":"https://github.com/huerlisi","followers_url":"https://api.github.com/users/huerlisi/followers","following_url":"https://api.github.com/users/huerlisi/following{/other_user}","gists_url":"https://api.github.com/users/huerlisi/gists{/gist_id}","starred_url":"https://api.github.com/users/huerlisi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huerlisi/subscriptions","organizations_url":"https://api.github.com/users/huerlisi/orgs","repos_url":"https://api.github.com/users/huerlisi/repos","events_url":"https://api.github.com/users/huerlisi/events{/privacy}","received_events_url":"https://api.github.com/users/huerlisi/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T11:55:04Z","updated_at":"2015-06-12T11:55:04Z","body":"This is still an issue. Could you please reopen?"}}