oare 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
5
5
  ## Basic Information
6
6
  #
7
7
  s.name = 'oare'
8
- s.version = '0.1.9'
8
+ s.version = '0.1.10'
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.required_ruby_version = '~> 1.9'
11
11
  s.required_rubygems_version = '>= 1.3.6'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: oare
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.9
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-05-31 00:00:00 +08:00
14
+ date: 2011-06-14 00:00:00 +08:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency