Closed zedalaye closed 9 years ago
Can you try if the solutions you proposed works? I don't use it anymore, so I would have to setup new app with this gem which could have take some time..
Yes it work. Both in Rails 4.1 and in Rails 4.2
Fixed by @laserlemon in #58
See 8902722545d66bfad9cef8e25e0f6aa4d49acdb3
In Rails 3.0 -> 4.1 there is no way to call model_name on an ActiveRecord instance. This is only possible in Rails 4.2
The solution is to add ".class" before ".model_name" this should work in all cases since from Rails 4.2 the call to ".model_name" is delegated to the instance class.
https://github.com/rails/rails/blob/4-2-stable/activemodel/lib/active_model/naming.rb#L220