c42/goldberg — Issue #123: culprits code can cause home page not to render
Author: professor
Created: 2011-12-01 01:59:20+00:00
State: open

Error....

Rendered home/_projects.html.haml (264.0ms)
Rendered home/_group_projects.html.haml (265.4ms)
Completed 500 Internal Server Error in 397ms

ActionView::Template::Error (undefined method `revision' for nil:NilClass):
16: %span.github-url
17: = link_to "on Github", project.github_url
18: - if !project.culprits_for_failure.empty?
19: %span.culprit
20: = "(Possible culprit(s): #{project.culprits_for_failure})"
app/models/project.rb:103:in `collect'
app/models/project.rb:103:in `culprits_for_failure'
app/views/home/_projects.html.haml:19:in `block in _app_views_home__projects_html_haml___4386309075124752201_70226169489640__99748641549855113'
app/views/home/_projects.html.haml:1:in `each'
app/views/home/_projects.html.haml:1:in `_app_views_home__projects_html_haml___4386309075124752201_70226169489640__99748641549855113'
app/views/home/_group_projects.html.haml:7:in `block in _app_views_home__group_projects_html_haml___3791502564093199432_70226169760640__4108929104030263289'
app/views/home/_group_projects.html.haml:5:in `each'
app/views/home/_group_projects.html.haml:5:in `_app_views_home__group_projects_html_haml___3791502564093199432_70226169760640__4108929104030263289'
app/controllers/home_controller.rb:10:in `projects_partial'

A quick fix is to comment out the culprit code in the view/home/_project.html.haml
-# if !project.culprits_for_failure.empty?
%span.culprit
= "(Possible culprit(s): #{project.culprits_for_failure})"