I'm trying to use ChartKick in my Sinatra application. When trying to create a control such as a barchart I get an error stating
undefined method `id' for {:cash=>82, :securities=>58}:Hash file: buffer.rb location: parse_object_ref line: 323
Any suggestions on resolving this?
app.rb
...
@estimates = {:cash => cash_estimate, :securities=> sec_estimate}
haml :results
...
results.haml
%label="By saving cash you will be able to retire at the age of #{@estimates[:cash]}}."
%br
%label="Choosing to invest your savings in stock securities may allow you to retire at #{@estimates[:securities]}."
%barchart[@estimates]
%script{:type => 'text/javascript', :src => '//www.google.com/jsapi'}
%script{:type => 'text/javascript', :src => '/js/chartkick.js'}