Answer the question
In order to leave comments, you need to log in
How can you explain NoMethodError during validation of model fields only(!!!) on heroku?
There is a User model, it has a location: point field. There is a simple validation of this field:
validates :location, :format => { :with => /\(-?\d+(?:\.\d+)?,-?\d(?:\.\d+)?\)/,<br>
:on => :update,<br>
:if => :location_changed? }<br>
Completed 500 Internal Server Error in 13ms 2012-07-31T18:14:37+00:00 app[web.1]: 2012-07-31T18:14:37+00:00 app[web.1]: NoMethodError (undefined method location_changed?' for #<User:0x00000004dc29c8>)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question