her icon indicating copy to clipboard operation
her copied to clipboard

Implemented attribute_changed_in_place? on models so validates_numericality_of validation will work

Open glappen opened this issue 10 years ago • 3 comments

This seems to work, and specs are passing, but let me know if there's a more natural way to do this, or if the method should be added in a different module.

glappen avatar Oct 29 '15 17:10 glappen

For our information, what is the current status of the project? Is it being maintained? Can we expect pull requests to be merged at some point? Thanks!

glappen avatar Nov 03 '15 19:11 glappen

hi @glappen thanks for the PR! We're considering an update to ActiveModel which would give us attribute_changed_in_place?Would that cover what you need?

zacharywelch avatar Jun 07 '17 02:06 zacharywelch

I've run into this but I'm not sure about this change as I think attribute_changed_in_place? is meant to detect changes to mutable objects that would not be visible in the changes hash. We don't have a raw database representation of the attributes to compare against like ActiveRecord does though so maybe this is the best we can do. A newer ActiveModel would be good but I guess that means Rails 5?

chewi avatar Feb 08 '18 13:02 chewi