aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/CHANGELOG.md
diff options
context:
space:
mode:
authorTejas Dinkar <tejas@gja.in>2013-12-02 10:20:43 +0530
committerTejas Dinkar <tejas@gja.in>2013-12-15 12:13:31 +0530
commitda2b05bb6b713a702eb0420079394bf273f1203e (patch)
tree854ece5341e6b41f45af5842fef164544a35e3b2 /activemodel/CHANGELOG.md
parentfc83efae516fc572551b3f1d67a12394800dd4e2 (diff)
downloadrails-da2b05bb6b713a702eb0420079394bf273f1203e.tar.gz
rails-da2b05bb6b713a702eb0420079394bf273f1203e.tar.bz2
rails-da2b05bb6b713a702eb0420079394bf273f1203e.zip
Allows you to check if an attribute has changed to a particular value
model.name_changed?(from: "Pete", to: "Ringo")
Diffstat (limited to 'activemodel/CHANGELOG.md')
-rw-r--r--activemodel/CHANGELOG.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md
index 77d1252f1f..42cf58a870 100644
--- a/activemodel/CHANGELOG.md
+++ b/activemodel/CHANGELOG.md
@@ -1,3 +1,9 @@
+* `attribute_changed?` now accepts parameters which check the old and new value of the attribute
+
+ `model.name_changed?(from: "Pete", to: "Ringo")`
+
+ *Tejas Dinkar*
+
* Fix `has_secure_password` to honor bcrypt-ruby's cost attribute.
*T.J. Schuck*