Risto Juola
2006-Mar-08 00:53 UTC
[Rails] render_to_string() in a controller that isn''t default route?
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.
--
Posted via http://www.ruby-forum.com/.
Maybe Matching Threads
- Using render_to_string in other custom classes
- calling render_to_string outside of controller
- Re: Train wreck getting render_to_string to work from foreign controller [SOLVED]
- rendering a partial inside another using render_to_string and (:formats) in controller
- render_to_string in a controller test?
