bit_core 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/bit_core/content_provider.rb +7 -3
- data/lib/bit_core/version.rb +1 -1
- data/spec/dummy/log/test.log +1239 -0
- data/spec/models/bit_core/content_provider_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6adedadc81269b42fae1d2e56c5692f3df414025
|
4
|
+
data.tar.gz: 6a5a7322377bbb235e8e27d96e738b7d19feca6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4aa5be9a8edcc773116b6ec6456f51bf45af38959f3bf5beeaeba465a0d8c5e6490786fd59b1ad2c1e5fbcee733a0ae86ca271ff826287c7c2ef40b25c3569e
|
7
|
+
data.tar.gz: 225a15bb5760b0810a6ccd24b07dedb28446d57a2b924d80f17b2e6206e20a1c7110256838e53ea37a792083fbe63ce1c3dda7b830cc5f423e1516b3e847874a
|
@@ -58,10 +58,14 @@ module BitCore
|
|
58
58
|
|
59
59
|
def data_attributes_exist
|
60
60
|
return unless data_attributes
|
61
|
-
|
62
|
-
|
61
|
+
attr_names = data_class.try(:attribute_names) || []
|
62
|
+
unknown_attrs = data_attributes.select do |a|
|
63
|
+
(a.class == Symbol || a.class == String) && !attr_names.include?(a.to_s)
|
64
|
+
end
|
65
|
+
return if unknown_attrs.count == 0
|
63
66
|
|
64
|
-
errors.add(:data_attributes, "must be attributes on the model class"
|
67
|
+
errors.add(:data_attributes, "must be attributes on the model class " \
|
68
|
+
"(unrecognized: #{ unknown_attrs.join(", ") })")
|
65
69
|
end
|
66
70
|
end
|
67
71
|
end
|
data/lib/bit_core/version.rb
CHANGED