On Wed, May 25, 2011 at 8: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. > > Just a quick reply. If you're going with the save to db approach, I think you might want to look at the render_to_string method. > 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 [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. > > -- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.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.

