non_AR model?

Hi all,
My app takes 9 input params from a form -

In controller:

I generate a graph by doing a Result.find(:all,:conditions=>[9 params
here]). The results got back are held in an array and there are lots of
other variables such as title of graph and axes that are set.

I use Gnuplot.open do|gp|
and write results etc to Gnuplot process
Gnuplot saves a png image to public/images

In view:

I loop through images and show them on screen.


What I am wondering is:
should I create a non-database model called Plot?
Plot could be instantiated with 9 parameters and it could go get the
results from Results.

Then the controller would be simplified and would look like:
Plot.new(9 params here)

Gnuplot process could use the Plot objects.

Or am I getting the concerns of the model and controller mixed up?
Is it ok to have a model use another model? - such as Plot using Result?

Please help, thanks

Chris

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs