Closed jtomaszewski closed 10 years ago
I keep having 'NameError: wrong constant name' wherever I use any kind of expose in my controllers in Rails 4.1 (was working great in 4.0).
expose
So I digged a little and the reason is that:
path # => "CarsController" path[0...(path.rindex('::') || 0)] # => "" (empty string) "".constantize # (rails 4.0) => Object "".constantize # (rails 4.1) => NameError: wrong constant name
Here is a small change that fixes that. P.S. maintainers of mongoid gem had similar problem.
mongoid
When is this gonna be merged? Thanks!
Merged: f9f4db1cf09edf32b5187c2710b56f41f14023e3
I keep having 'NameError: wrong constant name' wherever I use any kind of
expose
in my controllers in Rails 4.1 (was working great in 4.0).So I digged a little and the reason is that:
Here is a small change that fixes that. P.S. maintainers of
mongoid
gem had similar problem.