I need to offer custom reports but haven't been able to find an
existing package to help us.
How have other people solved this problem? I read old posts but
haven't found anything (Ruports isn't 1.9-compatible, which would bite
us later, and enterprisey tools aren't an option).
The queries are complicated, so I've added the lengthy SQL as heredocs
to models as private methods, and am using find_by_sql in public
methods in my Report class (living in app/models). However if I base
my model off ActiveRecord, I get "table doesn't exist" errors. I don't
need a reports table, so I'm doing without and calling find_by_sql
using one of the other model classes.
There's a ReportsController which calls the Report model class
It seems like I'm swimming against the current. What's the Rails-y way
to solve this problem? What I'm doing doesn't seem right.