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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f482995c10cf263b42e3b155290ececfccad06af
4
- data.tar.gz: b2e8d120e8ef19507ca85a5b7964724538d5bdf0
3
+ metadata.gz: 6adedadc81269b42fae1d2e56c5692f3df414025
4
+ data.tar.gz: 6a5a7322377bbb235e8e27d96e738b7d19feca6a
5
5
  SHA512:
6
- metadata.gz: fdbdbb15d3f4739cf22fb93461e2807cc2892b8585a8e95e889aad94e37307a1788feb2432c4bdc39d627d6827814677bb4f8d6e874ffe876d644597779772c8
7
- data.tar.gz: 6f43e0c9fb09ef131cef872d32d556749db2adfa98ed33dc38c1d5893f0151233b3a6443f2c8d317d55d84f6465500d281a1fe2559a7cbf4a31061a6c44562ef
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
- attribute_names = data_class.try(:attribute_names) || []
62
- return if data_attributes.all? { |a| attribute_names.include?(a.to_s) }
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
@@ -1,4 +1,4 @@
1
1
  # nodoc
2
2
  module BitCore
3
- VERSION = "1.1.4"
3
+ VERSION = "1.1.5"
4
4
  end