diff options
author | claudiob <claudiob@gmail.com> | 2015-09-01 10:56:25 -0700 |
---|---|---|
committer | claudiob <claudiob@gmail.com> | 2015-12-02 18:05:01 -0800 |
commit | 728e28ffd67655471c75f6adb56a0831fdf837b6 (patch) | |
tree | 6a5a71ca19517ad056a6ce130485c816430eac12 /activerecord/lib/active_record | |
parent | 2b6557e70a62158c87f744082f2044524f4f6257 (diff) | |
download | rails-728e28ffd67655471c75f6adb56a0831fdf837b6.tar.gz rails-728e28ffd67655471c75f6adb56a0831fdf837b6.tar.bz2 rails-728e28ffd67655471c75f6adb56a0831fdf837b6.zip |
Remove old comment about AC::Parameters>subclasses
[ci skip]
Q: What happens if you initialize an AR model by passing Parameters that
have not been whitelisted with `permit`?
A: An `ActiveModel::ForbiddenAttributesError` is raised.
I think this behavior is correct, and it's better than what used to happen,
with unpermitted parameter being simply ignored.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/inheritance.rb | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/inheritance.rb b/activerecord/lib/active_record/inheritance.rb index e094735799..6259c4cd33 100644 --- a/activerecord/lib/active_record/inheritance.rb +++ b/activerecord/lib/active_record/inheritance.rb @@ -195,8 +195,6 @@ module ActiveRecord # Detect the subclass from the inheritance column of attrs. If the inheritance column value # is not self or a valid subclass, raises ActiveRecord::SubclassNotFound - # If this is a StrongParameters hash, and access to inheritance_column is not permitted, - # this will ignore the inheritance column and return nil def subclass_from_attributes(attrs) attrs = attrs.to_h if attrs.respond_to?(:permitted?) if attrs.is_a?(Hash) |