render_to_string worked perfectly!

I just have to this in the controller and not in the view.

Controller:

@reportstring = render_to_string(:partial => "shared/
compare", :collection => @changedfamilies)

Then I can save the @reportstring in my database and call the whole
view wherever I need it!

Thank you!



On May 26, 10:17 am, Colin Law <[email protected]> wrote:
> On 26 May 2011 08:51, Sebastian <[email protected]> wrote:
>
> > Thank you all for your answers.
> > ...
> > @Colin Law: Cache is only temporarily. I need to save the report
> > permanently, so cache is no option.
>
> A page cache can be as permanent as you like.  It is up to you when
> you expire it.  If you never expire it then it will be permanent.  By
> doing it yourself you are just re-inventing the wheel.  The work has
> already been done for you by Rails developers.
>
> Colin

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to