Sebastian wrote in post #1001166:
> 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!

Do you need this solution to scale? Fetching that large string from the 
database is going to be far less efficient than Colin's suggestion about 
using page caching. The web server was designed to be highly efficient 
at serving static HTML content (i.e the cached pages). Using Rails and 
the database can't possibly match the performance of Apache or Nginx.

-- 
Posted via http://www.ruby-forum.com/.

-- 
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