saulabs/reportable — Issue #14: Error when using :culumate => true and Flot
Author: rantav
Created: 2012-01-31 13:49:01+00:00
State: open

I have this in my model:

reportable :total_invi, :conditions => ["is_invi_user = 't'"], :cumulate => true

And that in my view:

flot_report_tag(User.total_invi_report, {:height => 200, :width => 800}, { :grid => {:hoverable => true}}).html_safe

And the error I get when going to the view is:

undefined method `model_name' for #

/Users/ran/.rvm/gems/ruby-1.9.3-p0@rails313b/bundler/gems/reportable-083e1e969cab/lib/saulabs/reportable/report_tag_helper.rb:142:in `flot_report_tag'
app/views/reports/index.haml:7:in `_app_views_reports_index_haml___4219911542650979349_2153477080'

It seems that cumulate doesn't work well with flot. Other charts work ok, just the cumulate fails. Also, cumulate works OK with google, but not with flot.

That's the line with the error:

default_dom_id = "#{data.model_name.downcase}_#{data.report_name}#{@__flot_report_tag_count > 0 ? @__flot_report_tag_count : ''}"