Am I approaching this the wrong way according to the Ruby on Rails
I will explain the situation. I currently have a reporting system which
will create and eventually render a report based on some choices the
user has made in a GET request and eventually end up with a @report
Depending on what report the user wants, the @report object contains
different structures. Now there is a button on the same site, which is
called download report. Once this is called a different function in the
controller is called and I no longer have the @report object. This
forces me to recreate the same @report object based on model data which
takes quite a lot of processing time.
Is there any way to save this object between the different controller
functions? The first thing that comes to mind is the session hash.
Storing the @report in here though corrupts the session and causes an
error when it is used again (every next call) because it can not
determine the type of the @report object.
How is a good RoR programmer supposed to tackle this problem?