I am in the process of replacing existing controllers in an app with
resource controller. It works fine, but I am getting weird spec
failures I can’t explain. The failures happen for all destroy actions,
and only for destroy actions, and the error is the same in all
instances:
NoMethodError in ‘Admin::PriceCataloguesController DELETE destroy
redirects to the admin_price_catalogues list’ You have a nil object
when you didn’t expect it! The error occurred while evaluating
nil.call
Here’s a complete stacktrace along with the code and the spec that
makes it fail:
http://gist.github.com/90212.
The code works fine, hitting the destroy action from the browser works
perfectly. I have dug through the code, but I can’t find the problem.
Does anyone have any insight, what might be going wrong?
Thanks,
/Jonas Nicklas