vellam 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +1 -3
  2. data/lib/babel/hash_filter.rb +3 -2
  3. metadata +3 -2
data/README.md CHANGED
@@ -1,6 +1,4 @@
1
- [![Build Status](https://secure.travis-ci.org/mkristian/babel.png)](http://travis-ci.org/mkristian/babel)
2
-
3
- # babel #
1
+ # vellam [![Build Status](https://secure.travis-ci.org/mkristian/babel.png)](http://travis-ci.org/mkristian/babel) #
4
2
 
5
3
  rails comes with `to_json` and `to_xml` on models and you can give them an option map to control how the whole object tree gets serialized.
6
4
 
@@ -106,12 +106,13 @@ module Babel
106
106
  when Array
107
107
  if include.include?(k)
108
108
  models = model.send(k)
109
+ j = -1
109
110
  case include
110
111
  when Array
111
- result[k] = v.enum_with_index.collect { |i, j| filter_data(models[j], i, &block) }
112
+ result[k] = v.collect { |i| j += 1; filter_data(models[j], i, &block) }
112
113
  when Hash
113
114
  opts = include[k]
114
- result[k] = v.enum_with_index.collect { |i, j| filter_data(models[j], i, opts, &block) }
115
+ result[k] = v.collect { |i| j += 1; filter_data(models[j], i, opts, &block) }
115
116
  end
116
117
  end
117
118
  else
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vellam
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- version: "0.1"
9
+ - 1
10
+ version: 0.1.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Kristian Meier