{"shas":[["b06def3f6d37011d7ababd527e57e65aadbe08a1","ae42760ef71e07cdc78c21849b44551816bda917@k3integrations.com","The existing implementation of global_content_for didn't work for me.\n        This was returning a different object each time outer_content_for was called -- and it certainly wasn't the same object_id as self.object_id gave from the outermost layout view, so it must be creating a new object each time or something rather than just fetching the existing one (from an instance variable, f.e.):\n        \touter_view = controller.parent_controller.view_context\n\tso needless to say, when it saved the instance variable it had no effect on the global layout and when you tried to retrieve it there, it was not there.\n\tIt also didn't let you retrieve content with <%= content_for(:name) %> (content = nil) like the Rails one allows.\n\nChanged the render_cell in ActionView to pass in the current view (self) as :outer_view\n       def render_cell(name, state, opts = {}, &block)\n+        # This is so that we have this \"outer\" view object available to us from within the cell (available via @opts[:outer_view] or the outer_view helper) and can use Cells' outer_content_for, etc.\n+        opts.merge! :outer_view => self\n\nAlso, it was needlessly complex, since we can just do an instance_eval on the outer_view and then invoke and reuse Rails' normal content_for helper.\n\nRenamed global to outer, since there may be different layers and we aren't guaranteed to have the outermost (\"global\") one.","Tyler Rick"]],"repo":"TylerRick/cells","actor":"TylerRick","ref":"refs/heads/master","size":1,"head":"b06def3f6d37011d7ababd527e57e65aadbe08a1","actor_gravatar":"93e3e0fd88c1b97faebfe248c51017d3","push_id":23270499}