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 +4 -4
- data/lib/err_supply/controller_helpers.rb +2 -2
- data/lib/err_supply/version.rb +1 -1
- 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: ce3d99b223e895b683ab96c99cf77a07f1890a5a
|
4
|
+
data.tar.gz: 06da79c2db3d7dfeb5cb2f22acc2369a28fbfdea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/err_supply/version.rb
CHANGED