emmanuel.gomez at gmail.com
Wed Nov 25 15:13:34 EST 2009
I'm a little confused about the state of layout support in Cells.
I realize you can render :partial with a :layout option, but I envision layout support to be a little more like ActionController: you can set a default layout per cell, or you can explicitly render any template wrapped in any layout.
I find this kind of layout support really useful and I didn't see how to do that with Cells mainline today, so I've merged in changes from Chris Eppstein's branch. This adds a Cell::Base.layout class macro for setting a default layout for all states, and overrides some of the behavior in render_state to wrap the rendered output in a layout if requested.
Is this something that could make it into the mainline? I can add some tests for what I've got if there's any interest. Credit for the implementation goes to Chris Eppstein.
More information about the Cells-talk