Skip to content

Instantly share code, notes, and snippets.

@santiago
Created April 12, 2011 15:43
Show Gist options
  • Save santiago/915758 to your computer and use it in GitHub Desktop.
Save santiago/915758 to your computer and use it in GitHub Desktop.
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.[]
Extracted source (around line #45):
42: .entry
43: .calc
44: %p.label Closed Deals
45: %p.value #{number_with_delimiter @data.deals_closed_for(period)}
46: %p.chang=display_percent(@data.deals_closed_percent(period))
47: .calc
48: %p.label Coupons Purchased
Rails.root: /Users/santiago/Projects/groupBuying
Application Trace | Framework Trace | Full Trace
app/models/site_info.rb:36:in `deals_closed_for'
app/views/sites/show.html.haml:45:in `_app_views_sites_show_html_haml__225209490_2211440000_0'
app/views/sites/show.html.haml:40:in `each'
app/views/sites/show.html.haml:40:in `_app_views_sites_show_html_haml__225209490_2211440000_0'
app/controllers/sites_controller.rb:24:in `show'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment