Hi,
I posted this on the Ruby Reports forum as well, but this may be more
of a Rails How-To....
I''m using acts_as_reportable to generate a simple html table. I am
using a form for the user to select the model of which they want the
table, or tables for.
In my controller, I do this to generate the report:
@models.each { |m|
@totals = m.report_table(:all,:conditions
=>["enterdate >= ? AND enterdate <= ?",@start,@end]).to_html
}
@models contains all the check boxes that were selected in the form.
The problem is that when I try this, I get:
undefined method `report_table'' for "MyModel":String
MyModel is the name of my model, but it is being treated as a string.
Is there a way to do this?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---