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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bfe4b4df25f6a04e4eb832f1cf990541?d=identicon&s=25 Risto Juola (Guest)
on 2006-03-08 01: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.