aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/CHANGELOG.md
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-01-24 06:38:23 -0700
committerSean Griffin <sean@seantheprogrammer.com>2015-01-24 06:38:23 -0700
commit9bf9097973c083b23305fe3dddfb359f7049fec9 (patch)
treeb2bac4f265e248a67418d10a90437013e93c6341 /activemodel/CHANGELOG.md
parent847395a04df52a389823ff4367c4b002cdbb5c6a (diff)
parent5bdb42159ec461d678652319da14b4a59bfafd27 (diff)
downloadrails-9bf9097973c083b23305fe3dddfb359f7049fec9.tar.gz
rails-9bf9097973c083b23305fe3dddfb359f7049fec9.tar.bz2
rails-9bf9097973c083b23305fe3dddfb359f7049fec9.zip
Merge pull request #18663 from egilburg/reuse-attribute-assignment
Use attribute assignment module logic during ActiveModel initialization.
Diffstat (limited to 'activemodel/CHANGELOG.md')
-rw-r--r--activemodel/CHANGELOG.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md
index 9cebb680fc..77386e5e41 100644
--- a/activemodel/CHANGELOG.md
+++ b/activemodel/CHANGELOG.md
@@ -1,3 +1,14 @@
+* Assigning an unknown attribute key to an `ActiveModel` instance during initialization
+ will now raise `ActiveModel::AttributeAssignment::UnknownAttributeError` instead of
+ `NoMethodError`
+
+ ```ruby
+ User.new(foo: 'some value')
+ # => ActiveModel::AttributeAssignment::UnknownAttributeError: unknown attribute 'foo' for User.
+ ```
+
+ *Eugene Gilburg*
+
* Extracted `ActiveRecord::AttributeAssignment` to `ActiveModel::AttributeAssignment`
allowing to use it for any object as an includable module