Forum: Ruby on Rails non_AR model?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
0802f44285f29b69f788f4946ab46741?d=identicon&s=25 Chris Finch (cptfinch)
on 2007-02-23 11:50
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 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: 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

This topic is locked and can not be replied to.