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

Activemode::Dirty attributes query methods consistency before and after saving. #19847

Merged
merged 1 commit into from Apr 21, 2015

Conversation

Projects
None yet
2 participants
@fertapric
Contributor

fertapric commented Apr 21, 2015

Provides ActiveModel::Dirty#[attr_name]_previously_changed? and ActiveModel::Dirty#[attr_name]_previous_change to improve access to recorded changes after the model has been saved.

It makes the dirty-attributes query methods consistent before and after saving. It comes handy when attribute changes are inspected in controllers, services objects and so on.

Add `ActiveModel::Dirty#[attr_name]_previously_changed?` and
`ActiveModel::Dirty#[attr_name]_previous_change` to improve access
to recorded changes after the model has been saved.

It makes the dirty-attributes query methods consistent before and after
saving.

rafaelfranca added a commit that referenced this pull request Apr 21, 2015

Merge pull request #19847 from fertapric/activemodel-dirty-after-save…
…-syntactic-sugar

Activemode::Dirty attributes query methods consistency before and after saving.

@rafaelfranca rafaelfranca merged commit 7258b97 into rails:master Apr 21, 2015

@fertapric fertapric deleted the fertapric:activemodel-dirty-after-save-syntactic-sugar branch Aug 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment