{"action":"created","issue":{"url":"https://api.github.com/repos/yb66/Sinatra-Partial/issues/12","labels_url":"https://api.github.com/repos/yb66/Sinatra-Partial/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/yb66/Sinatra-Partial/issues/12/comments","events_url":"https://api.github.com/repos/yb66/Sinatra-Partial/issues/12/events","html_url":"https://github.com/yb66/Sinatra-Partial/pull/12","id":115656985,"number":12,"title":"Pass block to partial to enable yielding from partials","user":{"login":"archiloque","id":3771,"avatar_url":"https://avatars.githubusercontent.com/u/3771?v=3","gravatar_id":"","url":"https://api.github.com/users/archiloque","html_url":"https://github.com/archiloque","followers_url":"https://api.github.com/users/archiloque/followers","following_url":"https://api.github.com/users/archiloque/following{/other_user}","gists_url":"https://api.github.com/users/archiloque/gists{/gist_id}","starred_url":"https://api.github.com/users/archiloque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archiloque/subscriptions","organizations_url":"https://api.github.com/users/archiloque/orgs","repos_url":"https://api.github.com/users/archiloque/repos","events_url":"https://api.github.com/users/archiloque/events{/privacy}","received_events_url":"https://api.github.com/users/archiloque/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-07T10:07:17Z","updated_at":"2015-11-07T10:22:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yb66/Sinatra-Partial/pulls/12","html_url":"https://github.com/yb66/Sinatra-Partial/pull/12","diff_url":"https://github.com/yb66/Sinatra-Partial/pull/12.diff","patch_url":"https://github.com/yb66/Sinatra-Partial/pull/12.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/yb66/Sinatra-Partial/issues/comments/154688897","html_url":"https://github.com/yb66/Sinatra-Partial/pull/12#issuecomment-154688897","issue_url":"https://api.github.com/repos/yb66/Sinatra-Partial/issues/12","id":154688897,"user":{"login":"archiloque","id":3771,"avatar_url":"https://avatars.githubusercontent.com/u/3771?v=3","gravatar_id":"","url":"https://api.github.com/users/archiloque","html_url":"https://github.com/archiloque","followers_url":"https://api.github.com/users/archiloque/followers","following_url":"https://api.github.com/users/archiloque/following{/other_user}","gists_url":"https://api.github.com/users/archiloque/gists{/gist_id}","starred_url":"https://api.github.com/users/archiloque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archiloque/subscriptions","organizations_url":"https://api.github.com/users/archiloque/orgs","repos_url":"https://api.github.com/users/archiloque/repos","events_url":"https://api.github.com/users/archiloque/events{/privacy}","received_events_url":"https://api.github.com/users/archiloque/received_events","type":"User","site_admin":false},"created_at":"2015-11-07T10:22:11Z","updated_at":"2015-11-07T10:22:11Z","body":"Hello,\r\n\r\nan example, since I'm not sure how to make a relevant test\r\n\r\n* when using https://gist.github.com/seanami/496702 you can write sinatra helpers with blocks\r\n* write this kind of partial\r\n````\r\n<form>\r\n  <% yield %>\r\n</form>\r\n````\r\n* then declare a helper like this\r\n````\r\ndef my_partial_with_block(&block)\r\n  buffer << partial(:'my_helper.html', &block)\r\nend\r\n````\r\n* then in your erb file you can call the partial with a block\r\n````\r\n<% my_partial_with_block do %>\r\n<!-- some html here -->\r\n<% end %>\r\n```\r\n\r\nIt's handy to make your templates cleaner when using things like bootstrap that require much boilerplate html."}}