On Feb 10, 12:39   䮮
> On 2/10/08, Thufir <hawat.thu... / gmail.com> wrote:
>
> > On Feb 10, 9:20 am, Phlip <phlip2... / gmail.com> wrote:
> > Is there a more ruby-ish or rails way?  
> > _why would do it like that, it seems kludgy.
>
> > Let me rephrase the question:
>
> > What's the optimal technique (idiom?) for getting output from the
> > model?
>
> If you want to store the output to a log file or something similar,
> use the logger object (for example, logger.info).

Oh, I should've written HTML output for a user.

> Otherwise, there isn't a simple way of getting HTML from the model and
> that's because the model never speaks directly with the view. It's the
> controller's job to do that. If you look closely, you'll see that you
> completely skipped the controller.

I know :(

> As a hint, try using scaffolds and modify one to suit your needs. It
> might give you a good head-start, but remember that sometimes you
> might have to seriously tweak them.

I have a scaffold for this model, I'm using rails 1.5 IIRC.

Ok, I started to do that before going this direction.  I had the
desired output through the console, but didn't know how to translate
that to MVC, which is the bigger question.

Basically, the model has a report method, then, in the controller
there's a "run_report" method?  Then the view "calls" run_report?


Thanks,

Thufir

http://code.google.com/p/goodfellow-tool/source/browse