oare 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/active_resource_override/errors.rb +2 -1
- data/oare.gemspec +1 -1
- metadata +2 -2
@@ -2,13 +2,14 @@ class Oare::Errors < ActiveResource::Errors
|
|
2
2
|
def from_array(messages, save_cache = false)
|
3
3
|
clear unless save_cache
|
4
4
|
humanized_nested_attributes = @base.nested_attributes_values.map do |model, v|
|
5
|
+
next if v.blank?
|
5
6
|
v.map do |i, v2|
|
6
7
|
v2.keys.map do |k|
|
7
8
|
attribute_name = "#{model.gsub('_attributes','')}_#{k}".underscore
|
8
9
|
[attribute_name.humanize, attribute_name]
|
9
10
|
end
|
10
11
|
end
|
11
|
-
end.flatten
|
12
|
+
end.flatten.compact
|
12
13
|
humanized_nested_attributes = Hash[*humanized_nested_attributes]
|
13
14
|
|
14
15
|
humanized_attributes = @base.attributes.keys.inject({}) { |h, attr_name| h.update(attr_name.humanize => attr_name) }
|
data/oare.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: oare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.10
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Nelvin Driz
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-
|
14
|
+
date: 2011-06-14 00:00:00 +08:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|