a1dert/lh-tickets-test — Issue #259: NoMethodError in DemandsController#index when try to open requests page for nonexistent company site
Author: a1dert
Created: 2011-11-30 12:01:31+00:00
State: open

Imported from lighthouse. Original ticket at: http://redtape.lighthouseapp.com/projects/59696/tickets/345. Created by Alexey Derkach - 2011-06-29T11:46:29Z

Steps to reproduce:
1. We have company site – sitename.articulateexpress.com
2. Open request (for example – purchases) page for nonexistent company site – sitename1.articulateexpress.com/purchases. You must be logged out from exist company site.

Expected: user should see message about 404 error – “The page you were looking for doesn’t exist.”
Actual: server error.

Details:
@@@
undefined method `units?’ for nil:NilClass
@@@

Trace:
@@@
lib/redtape_units.rb:15:in `_callback_before_1369’
@@@

Request:
@@@
{"model_type"=>"purchases"}
@@@

According to: [story 6743](https://tracker.anahoret.com/projects/44/stories/6743 "story 6743")