{"action":"created","issue":{"url":"https://api.github.com/repos/apotonick/cells/issues/129","labels_url":"https://api.github.com/repos/apotonick/cells/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/apotonick/cells/issues/129/comments","events_url":"https://api.github.com/repos/apotonick/cells/issues/129/events","html_url":"https://github.com/apotonick/cells/issues/129","id":5466856,"number":129,"title":"Wrapping a Cell around content","user":{"login":"the8472","id":1065730,"avatar_url":"https://avatars.githubusercontent.com/u/1065730?v=3","gravatar_id":"","url":"https://api.github.com/users/the8472","html_url":"https://github.com/the8472","followers_url":"https://api.github.com/users/the8472/followers","following_url":"https://api.github.com/users/the8472/following{/other_user}","gists_url":"https://api.github.com/users/the8472/gists{/gist_id}","starred_url":"https://api.github.com/users/the8472/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the8472/subscriptions","organizations_url":"https://api.github.com/users/the8472/orgs","repos_url":"https://api.github.com/users/the8472/repos","events_url":"https://api.github.com/users/the8472/events{/privacy}","received_events_url":"https://api.github.com/users/the8472/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2012-07-06T14:58:37Z","updated_at":"2015-10-12T23:04:59Z","closed_at":null,"body":"With helpers I can do the following:\n\n```ruby\n# my_helper.rb\n\ndef my_helper(&block)\n  content_tag(:div,&block)\nend\n```\n\n```haml\n-# my_view.haml\n\n=my_helper do\n   %h1=myObj.title\n   some content here\n```\n\nTo my knowledge something equivalent currently isn't possible with cells since they take a block for configuration, not for content-capturing\n\nIf we could pass blocks of content to a cell's state and then either call the block/capture its content or even yield inside a cell's view to wrap it this would get us closer to doing away with helpers."},"comment":{"url":"https://api.github.com/repos/apotonick/cells/issues/comments/147544821","html_url":"https://github.com/apotonick/cells/issues/129#issuecomment-147544821","issue_url":"https://api.github.com/repos/apotonick/cells/issues/129","id":147544821,"user":{"login":"ivanyv","id":6844,"avatar_url":"https://avatars.githubusercontent.com/u/6844?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanyv","html_url":"https://github.com/ivanyv","followers_url":"https://api.github.com/users/ivanyv/followers","following_url":"https://api.github.com/users/ivanyv/following{/other_user}","gists_url":"https://api.github.com/users/ivanyv/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanyv/subscriptions","organizations_url":"https://api.github.com/users/ivanyv/orgs","repos_url":"https://api.github.com/users/ivanyv/repos","events_url":"https://api.github.com/users/ivanyv/events{/privacy}","received_events_url":"https://api.github.com/users/ivanyv/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T23:04:59Z","updated_at":"2015-10-12T23:04:59Z","body":"I tried (Slim):\r\n\r\n```\r\n= cell :cell, nil, content: -> do\r\n  h1 Blah\r\n```\r\n\r\nThen on the cell view:\r\n\r\n```\r\n= @options[:content].call\r\n```\r\n\r\nBut that outputs the content twice, once before the cell's HTML. If I do `-` instead of `=` then just the content on the wrong place is rendered."}}