Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

NoMethodError (undefined method `field_changed?' for User) #8231

Closed
nguyenchiencong opened this Issue · 7 comments

4 participants

@nguyenchiencong

After Rails update to 3.2.9 with field_changed? to _field_changed? we have this problem. It's breaking the whole app. It's a pitty we don't have a deprecation message in previous versions

@rafaelfranca

field_changed? is a private method and you should not using it in your application. We don't added a deprecation working because it is not public API

@nguyenchiencong

Hi @rafaelfranca the problem is I'm not using field_changed? and everytime I tried to change an attribute of any class in my Project:

example

user = User.first
user.unconfirmed_email = 'dsqds'
NoMethodError: undefined method `field_changed?' for #<User:0x00000002260398>
from /home/ssc/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activemodel-3.2.9/lib/active_model/attribute_methods.rb:407:in `method_missing'
@nguyenchiencong

This issue should definitly be reopened. at first thought it was Devise's problem but it now seems that field_change? is still being called instead of _field_changed? on rails everytime I want to do sth with an ActiveRecord object. (new, change attribute ...)

@guilleiguaran

Can you please provide a sample application that reproduces the error?

@nguyenchiencong

Something is wrong with my app and can't figure what yet. I create a testapp with 3.2.9 and it's working like a charm

@nguyenchiencong

Found the problem for those who have the same issue: composite-primary-keys/composite_primary_keys#128

@carlosantoniodasilva

Yes, it has been renamed to _field_changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.