mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #22476 from claudiob/comment-prem
Remove old comment about AC::Parameters>subclasses
This commit is contained in:
commit
215f86c348
2 changed files with 7 additions and 2 deletions
|
@ -432,6 +432,13 @@
|
||||||
|
|
||||||
*Wojciech Wnętrzak*
|
*Wojciech Wnętrzak*
|
||||||
|
|
||||||
|
* Instantiating an AR model with `ActionController::Parameters` now raises
|
||||||
|
an `ActiveModel::ForbiddenAttributesError` if the parameters include a
|
||||||
|
`type` field that has not been explicitly permitted. Previously, the
|
||||||
|
`type` field was simply ignored in the same situation.
|
||||||
|
|
||||||
|
*Prem Sichanugrist*
|
||||||
|
|
||||||
* PostgreSQL, `create_schema`, `drop_schema` and `rename_table` now quote
|
* PostgreSQL, `create_schema`, `drop_schema` and `rename_table` now quote
|
||||||
schema names.
|
schema names.
|
||||||
|
|
||||||
|
|
|
@ -195,8 +195,6 @@ module ActiveRecord
|
||||||
|
|
||||||
# Detect the subclass from the inheritance column of attrs. If the inheritance column value
|
# Detect the subclass from the inheritance column of attrs. If the inheritance column value
|
||||||
# is not self or a valid subclass, raises ActiveRecord::SubclassNotFound
|
# 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)
|
def subclass_from_attributes(attrs)
|
||||||
attrs = attrs.to_h if attrs.respond_to?(:permitted?)
|
attrs = attrs.to_h if attrs.respond_to?(:permitted?)
|
||||||
if attrs.is_a?(Hash)
|
if attrs.is_a?(Hash)
|
||||||
|
|
Loading…
Reference in a new issue