Rendering a cell from within a model

10 views
Skip to first unread message

Mike Pence

unread,
Oct 19, 2013, 2:22:35 PM10/19/13
to cells-an...@googlegroups.com
Hey guys,

I need to render a cell from a model, or any arbitrary Ruby class in general. Any pointers?

Mike Pence

unread,
Oct 19, 2013, 2:31:06 PM10/19/13
to cells-an...@googlegroups.com
Found my owner answer:

 ApplicationController.new.render_cell(name, :index)

Nick Sutterer

unread,
Oct 21, 2013, 5:42:57 PM10/21/13
to cells-an...@googlegroups.com
Oh, I didn't know you can instantiate the ApplicationController like that, haha. You can also always do the following:

Cell::Rails.create_cell(@controller, name).render_state(:index)

However, this requires a controller instance. I am working towards getting completely rid of this dependency.


2013/10/20 Mike Pence <mike....@gmail.com>
--
Sie erhalten diese Nachricht, weil Sie Mitglied der Google Groups-Gruppe "Cells and Apotomo" sind.
Um Ihr Abonnement für diese Gruppe zu beenden und keine E-Mails mehr von dieser Gruppe zu erhalten, senden Sie eine Email an cells-and-apot...@googlegroups.com.
Weitere Optionen: https://groups.google.com/groups/opt_out

Reply all
Reply to author
Forward
0 new messages