As long as it isn't too large for a text column in your DB, sure.

Walter

On May 25, 2011, at 9:28 AM, Sebastian wrote:

Similar question:

Is it possible to store the output of a rendered partial as html?

Sebastian

On May 25, 2:15 pm, Sebastian <[email protected]> wrote:
Hi,

I want to create some reports on my app that are stored. So it is not
a big deal to create a view where my report is shown out of some
existing activerecords.

But how can I save what I see? Meaning save the whole page as report
in the database. I thought the easiest way is to store the whole page
in a long string with html markup. So I can easily render that value
later with 'raw' method.

An example:

store this as activerecord:
<p>This is some text</p>

call that in a later view for showing the report:
<%= raw Report.find(12).text %>

Is that the best approach or is there another one? If it is the best
approach, is there a way to get the html code of the recent page to
store that in an activerecord.

Sebastian

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


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