Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented attribute_changed_in_place? on models so validates_numericality_of validation will work #383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

glappen
Copy link

@glappen glappen commented Oct 29, 2015

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
Copy link
Author

glappen commented Nov 3, 2015

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!

@zacharywelch
Copy link
Collaborator

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?

@chewi
Copy link
Contributor

chewi commented Feb 8, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants