aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorYuki Nishijima <mail@yukinishijima.net>2014-10-15 17:32:35 -0700
committerYuki Nishijima <mail@yukinishijima.net>2014-10-15 17:32:35 -0700
commit074880c4eab3121025840998e587753203f65f6f (patch)
treedc5d290bda20162a773c38049a9acb5dd68eb091 /activerecord/CHANGELOG.md
parente01f1b3406057d48ee2742a80e909821cb8e5d43 (diff)
downloadrails-074880c4eab3121025840998e587753203f65f6f.tar.gz
rails-074880c4eab3121025840998e587753203f65f6f.tar.bz2
rails-074880c4eab3121025840998e587753203f65f6f.zip
AR::UnknownAttributeError should include the class name of a record
This would be helpful if 2 models have an attribute that has a similar name to the other. e.g: before: User.new(name: "Yuki Nishijima", projects_attributes: [name: "kaminari"]) # => ActiveRecord::UnknownAttributeError: unknown attribute: name after: User.new(name: "Yuki Nishijima", projects_attributes: [name: "kaminari"]) # => ActiveRecord::UnknownAttributeError: unknown attribute on User: name
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index b12d048169..a1bef4aa93 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,13 @@
+* `AR::UnknownAttributeError` now includes the class name of a record.
+
+ This would be helpful if 2 models have an attribute that has a similar
+ name to the other one. e.g.:
+
+ User.new(name: "Yuki Nishijima", project_attributes: {name: "kaminari"})
+ # => ActiveRecord::UnknownAttributeError: unknown attribute on User: name
+
+ *Yuki Nishijima*
+
* Fix regression causing `after_create` callbacks to run before associated
records are autosaved.