blank tuneup bar: link_to trend + tuneup_data.time.to_i, '#' throws nil.+ exception
|
|
Installed the gem, added line to environment.rb, restarted, hit up a page in the app. The tuneup bar is there, but the right side is blank. The dev log shows:
ActionView::TemplateError (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.+) on line #5 of opt/local/lib/ruby/gems/1.8/gems/fiveruns_tuneup-0.8.16/views/tuneup/_data.html.erb:
2: <div id='tuneup-top'>
3: <div id='tuneup-summary'>
4: <%= tuneup_bar(tuneup_data.children.first, :id => 'tuneup-root-bar') %>
5: <%= link_to trend + tuneup_data.time.to_i, '#' %> ms
6: </div>
7: <%= link_to_upload %>
8: </div>
/opt/local/lib/ruby/gems/1.8/gems/fiveruns_tuneup-0.8.16/views/tuneup/_data.html.erb:5:in `_run_erb_47opt47local47lib47ruby47gems47146847gems47fiveruns_tuneup450468461647views47tuneup47_data46html46erb'
...snip...
Fixed it by changing line 5 of _data.html.erb to: <%= link_to (trend.blank? ? '0' : trend) + tuneup_data.time.to_i.to_s, '#' %> msHave seen the to_i.to_s mentioned in other threads too.
|
