werein / x-editable-rails

Edit fields easily with X-Editable helper

Home Page:https://wereinhq.com/guides/x-editable-rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Latest version 1.5.4 breaks Rails 4.1 compatibility

zedalaye opened this issue · comments

See 8902722

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

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