I think I have found the answer-- apparently in the view templates,
you just call "render" and not "render_to_string". The
explanation
for this is probably that in the view you always want to render to a
string, but I''m not sure.
--Paul
On Mar 23, 6:09 pm, "Paul E. G. Lynch"
<plynch...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Do I need to include anything special in order to call
> render_to_string from the view? When I try to do something like this
> in my rhtml template:
>
> <%= render_to_string(:partial => "user_description") %>
>
> I get the error:
>
> undefined method `render_to_string'' for
#<#<Class:0xb76e9134>:
> 0xb76e910c>
>
> followed by an excerpt from my template. Do I have something wrong
> with the syntax?
>
> Thanks,
> --Paul
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---