Forum: Ruby on Rails render_to_string() in a controller that isn't default route?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Risto Juola (Guest)
on 2006-03-08 02:53
Is it possible to call render_to_string() in a controller that is not
set as the default route?

The content controller is set in routes.rb: map.connect '', :controller
=> "content".  The content controller is calling a template controller,
and I would like to be able to call render_to_string() within the
template controller, however I receive the error:

     undefined method `render_to_string' for TemplateController:Class

I've tried directly require()'ing the ActionController Base class file
which defines the render_to_string function (not a solution I would want
to use - that was more out of curiousity), and that didn't work.

Thanks in advance.
This topic is locked and can not be replied to.