err_supply 0.1.9 → 0.1.10

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: 4577a0f43154f67f613dd3e05c79ae6914e8709c
4
- data.tar.gz: f9c023c64129d272e754ac5db84040987a4143d0
3
+ metadata.gz: ce3d99b223e895b683ab96c99cf77a07f1890a5a
4
+ data.tar.gz: 06da79c2db3d7dfeb5cb2f22acc2369a28fbfdea
5
5
  SHA512:
6
- metadata.gz: 1a44afbe3018ce2e4fef4361b31fe281b296892de5e9ff6dd485f91767f278803290fcecada720cd284240d5a4d9fff2f7dc2830618b8e89cc2a80509bf670f0
7
- data.tar.gz: 6cf042b7ae506342fa556f7ca69f52c3e33ebbf70514d41eb0358ea11f142962f45233b5b80f7521b9e8ddda415eae3c0b4d0bfeddc37ecbb636e0164311a563
6
+ metadata.gz: 3f92242346c102906174e7cb110acf4203a77b51ef389cf6e81e46f319ea7e685ef0584e42ede71cef8b2e7f8abd32f6608676061164fd2aa03a2176845ed0b0
7
+ data.tar.gz: cdfdb6ddd83621c30ea6ba1027d64a179e338a5580918fd705c9cd14a1322a77139038f7da0817c202200f48c539147a3574fdc9fa1da140421564ab669819db
@@ -43,7 +43,7 @@ module ErrSupply
43
43
  # apply errors that match our list (slightly inefficient, but a touch easier to read)
44
44
  attrs.each do |attr|
45
45
  o = options[attr.to_sym] || {}
46
- id = [prefix, "#{(o[:key] || attr).to_s}"].join('_')
46
+ id = [prefix, "#{(o[:key] || attr).to_s}"].reject(&:blank?).join('_')
47
47
 
48
48
  unless h.has_key?(id)
49
49
  h[id] = {
@@ -70,7 +70,7 @@ module ErrSupply
70
70
  c_options = options[assoc_name.to_sym] || {}
71
71
  obj.send("#{assoc_name}").each_with_index do |child, index|
72
72
  if !child.errors.empty? or child.invalid?
73
- c_prefix = [prefix, "#{assoc_name}_attributes_#{index}"].join('_')
73
+ c_prefix = [prefix, "#{assoc_name}_attributes_#{index}"].reject(&:blank?).join('_')
74
74
  c_hash = err_supply_hash(child, c_options.merge({ :prefix => c_prefix }))
75
75
 
76
76
  h.merge!(c_hash)
@@ -1,3 +1,3 @@
1
1
  module ErrSupply
2
- VERSION = '0.1.9'
2
+ VERSION = '0.1.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: err_supply
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Coroutine