Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using :culumate => true and Flot #14

Open
rantav opened this issue Jan 31, 2012 · 1 comment
Open

Error when using :culumate => true and Flot #14

rantav opened this issue Jan 31, 2012 · 1 comment

Comments

@rantav
Copy link

rantav commented Jan 31, 2012

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 #<Array:0x00000102e30d70>

/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 : ''}"
@kommen
Copy link
Member

kommen commented Jan 31, 2012

Yes, this is due to a change in ruby 1.9.3, see: https://gist.github.com/1415940

I'm already about to fix this.

kommen added a commit that referenced this issue Feb 1, 2012
…ad. #14

This change is needed due to a ruby 1.9.3. inheritance change, see
https://gist.github.com/1415940
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants