-
Notifications
You must be signed in to change notification settings - Fork 21.9k
Closed
Description
Given this code:
controller = Class.new(ApplicationController) do
# ...
end
I get the following error:
+/Users/david/.rvm/gems/ruby-1.9.2-p180@rspec-dev/gems/activesupport-3.1.0.beta1/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `sub' for nil:NilClass (NoMethodError)
+ from /Users/david/.rvm/gems/ruby-1.9.2-p180@rspec-dev/gems/actionpack-3.1.0.beta1/lib/action_controller/metal/params_wrapper.rb:140:in `_default_wrap_model'
This is caused by model_name = self.name.sub(/Controller$/, '').singularize
on
model_name = self.name.sub(/Controller$/, '').singularize |
Metadata
Metadata
Assignees
Labels
No labels