Skip to content

Commit 117ed1e

Browse files
committed
Fix CI for versions < 7.2
1 parent 1cabe68 commit 117ed1e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/active_resource/base.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,6 +1612,13 @@ def load(attributes, remove_root = false, persisted = false)
16121612
self
16131613
end
16141614

1615+
if ActiveModel::VERSION::MAJOR <= 7 && ActiveModel::VERSION::MINOR < 2
1616+
def assign_attributes(new_attributes)
1617+
new_attributes = new_attributes.stringify_keys if new_attributes
1618+
super
1619+
end
1620+
end
1621+
16151622
# Updates a single attribute and then saves the object.
16161623
#
16171624
# Note: <tt>Unlike ActiveRecord::Base.update_attribute</tt>, this method <b>is</b>

0 commit comments

Comments
 (0)