driki/Budget-Hero — Issue #45: NoMethodError in console while rendering budget overview
Author: jasonhowes
Created: 2012-01-01 16:56:24+00:00
State: open

A request to the path "http://budgetvisionapp.local:9292/organizations/211/projects/3" results in the following exception in the console output:

```ruby
NoMethodError - undefined method `organization' for nil:NilClass:
/Users/jhowes/Development/driki/budgetvision/views/project.erb:49:in `block in evaluate_source'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/dm-core-1.2.0/lib/dm-core/collection.rb:507:in `block in each'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/dm-core-1.2.0/lib/dm-core/support/lazy_array.rb:411:in `block in each'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/dm-core-1.2.0/lib/dm-core/support/lazy_array.rb:411:in `each'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/dm-core-1.2.0/lib/dm-core/support/lazy_array.rb:411:in `each'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/dm-core-1.2.0/lib/dm-core/collection.rb:504:in `each'
/Users/jhowes/Development/driki/budgetvision/views/project.erb:49:in `each_with_index'
/Users/jhowes/Development/driki/budgetvision/views/project.erb:49:in `evaluate_source'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `instance_eval'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `evaluate_source'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:144:in `cached_evaluate'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:127:in `evaluate'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:625:in `render'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:512:in `erb'
/Users/jhowes/Development/driki/budgetvision/routes/project.rb:11:in `block in '
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `block in compile!'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `[]'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (3 levels) in route!'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in `route_eval'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (2 levels) in route!'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in `block in process_route'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `catch'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `process_route'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in `block in route!'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `each'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `route!'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in `dispatch!'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `block in call!'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `block in invoke'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `catch'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/omniauth-1.0.1/lib/omniauth/strategy.rb:168:in `call!'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/omniauth-1.0.1/lib/omniauth/strategy.rb:148:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/omniauth-1.0.1/lib/omniauth/strategy.rb:168:in `call!'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/omniauth-1.0.1/lib/omniauth/strategy.rb:148:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/omniauth-1.0.1/lib/omniauth/strategy.rb:168:in `call!'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/omniauth-1.0.1/lib/omniauth/strategy.rb:148:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/omniauth-1.0.1/lib/omniauth/builder.rb:34:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/session/abstract/id.rb:195:in `context'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/session/abstract/id.rb:190:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/logger.rb:15:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/commonlogger.rb:20:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/head.rb:9:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/methodoverride.rb:24:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/sinatra-1.3.1/lib/sinatra/showexceptions.rb:21:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/lint.rb:48:in `_call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/lint.rb:36:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/showexceptions.rb:24:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/commonlogger.rb:20:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/chunked.rb:41:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/content_length.rb:14:in `call'
/Users/jhowes/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/handler/webrick.rb:59:in `service'
/Users/jhowes/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/Users/jhowes/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/Users/jhowes/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
```