In a view, render_partial() returns a string of HTML.
In a controller, render_partial() _doesn''t_ return a string of HTML;
it whisks control away from the controller.
I want to do the following (in a controller):
def show
...
@content_for_div = render_partial(...)
...
end
Is there a way to do this? The logic for which partial gets rendered is not
straightforward, so I''d like to keep it away from the view.
(There''s always helpers, I guess...)
Gavin
On 13/04/2005, at 11:16 AM, Gavin Sinclair wrote:> In a view, render_partial() returns a string of HTML. > > In a controller, render_partial() _doesn''t_ return a string of HTML; > it whisks control away from the controller.You want render_to_string Unfortunately the docs suck... If you get them time please submit some docs for it to the bugtracker. - tim lucas