protected_attributes_continued 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b6d06c9ecd345f54b7136e67b717a90712ee240
4
- data.tar.gz: b00b7d6f1387c84804247d7219a6ca6bb38a0157
3
+ metadata.gz: 56c3f71108cf6ddd82e5741e05fcec365779f2e3
4
+ data.tar.gz: ea0bc67a868cdb1a851c7049c0f0dd089311f8c7
5
5
  SHA512:
6
- metadata.gz: 06fcac1475f0ceb85717733847aadf0a377b83cb5a2e94f9d36b8007315b4322020d9a386ae584e990e7e0aeaa928d7c3005093c1d0188b60f2cea59e87e4c66
7
- data.tar.gz: 84651f941e29bb0257a052d6c8feec3548851f3e1eebcb6948aa7f01b8beacffb2b76622be5d84a843b3f4ab3bb7eb1453d9f6b3b4ac3d76a13a21e07e6a2f82
6
+ metadata.gz: b13e67349efef0c75fa9f6661048245185e4c4996a07d9c1a31f338078cb9eaea1054de1687c2d1cfcd0e965d217a91278d8e4a8b710860a767d2e6c57896823
7
+ data.tar.gz: 3e5a645d5fd009a65c8071198696afab5a5548ebe60afe3012952a2260e26d5c0382aa78a368603e2fa6a35db0f0c94528dc555e914ab393cba05a77aaa8dcd1
@@ -76,11 +76,9 @@ module ActiveRecord
76
76
  def assign_nested_attributes_for_collection_association(association_name, attributes_collection, assignment_opts = {})
77
77
  options = self.nested_attributes_options[association_name]
78
78
 
79
- class_name = attributes_collection.class.name
80
-
81
- if class_name == 'ActionController::Parameters'
79
+ if attributes_collection.class.name == 'ActionController::Parameters'
82
80
  attributes_collection = attributes_collection.to_unsafe_h
83
- elsif !['Hash','Array'].include?(class_name)
81
+ elsif !attributes_collection.is_a?(Hash) && !attributes_collection.is_a?(Array)
84
82
  raise ArgumentError, "ActionController::Parameters or Hash or Array expected, got #{attributes_collection.class.name} (#{attributes_collection.inspect})"
85
83
  end
86
84
 
@@ -1,3 +1,3 @@
1
1
  module ProtectedAttributes
2
- VERSION = "1.2.3"
2
+ VERSION = "1.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protected_attributes_continued
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-20 00:00:00.000000000 Z
12
+ date: 2016-09-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel