[Cells-talk] RFC: introducing a #render method in Cells?
Nick Sutterer
apotonick at gmail.com
Mon Jun 8 17:05:07 EDT 2009
hey you guys out there,
this list is very low-traffic ATM, i hope this means cells is as
stable as you expect it to be and the docs do not leave a single
question unanswered ;-)
i was thinking about introducing a new method #render which can be
called in cell states.
providing no arguments as
def my_state
# ... do something
render
end
would just expose the same behaviour as returning nil.
however, it would accept the following options:
def another_state
# ... do something meaningful
render :layout => 'metal',
:template_format => :html,
:view => 'another_view'
end
providing support for
- layouts for cells
- a template format different to "html" (not possible currently)
- rendering a freely choosable view from the cell, not being tied to
the state name
i'd love to hear your feedback, just briefly
- is this confusing- having a #render method with a DIFFERENT api than
ActionController#render ?
- if yes, what could the method name be?
- did you already miss one or more these new features in the current version?
- would you expect #render to render a :partial as well? (that
wouldn't make any sense at all, would it?)
thanks and cheers,
nick
More information about the Cells-talk
mailing list