baseapi 0.1.26 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f01dca1b73c4efa204da57dd9ff4b5a2c13f4a8
4
- data.tar.gz: c718dda7e85052eaf9cc72b8267c9a0f6b33c463
3
+ metadata.gz: 22da57893ec046859ea2945046b0a04aa7588c62
4
+ data.tar.gz: f456bc0f3bea3c443a5ab80e8832f0f333fb43dc
5
5
  SHA512:
6
- metadata.gz: a672637883da8aefe975cb98bbd69d8dd57da32bf0fd530bc2a247c84b7591cde27b622916e3dfc5567ae20afd0dd5b47c2f7e9fa25d3e6e74cbf47fc5ae88f3
7
- data.tar.gz: c968f26bd6a3f5b097d1a2a1c76f7849045d3fc7fac5999753e6eb7167c328f8218781af4ecd0a6a5f7f90535e95930a460d608f49b611f8ba501761f29f9a02
6
+ metadata.gz: 132ea0d1d4c1623c9bf59f2bcc2fdeba3655015448e7c570aef6051b92bb2f85e89b163303e9be6da493ec914086899b3151229109d6dc940943a6ee997c5a7b
7
+ data.tar.gz: 739c0d09956805c14d83a11080519d34b849991cb7c159b4942d7321676f2fbe415c6732a0ec991694e07df29f6b76eb24ecfaf02aa20724d0df82d8bf8e71fb
@@ -17,7 +17,6 @@ module ActiveRecordRelationExtension
17
17
  # belongs_to, has_many search
18
18
  else
19
19
  relationSearch = -> (models, currentModel, key, value, prefix = '', joins = []) {
20
- joins.push key
21
20
  associations = currentModel.get_associations()
22
21
  associations.keys.each do |association|
23
22
  if currentModel.column_names.include?(key)
@@ -29,11 +28,12 @@ module ActiveRecordRelationExtension
29
28
  elsif associations[association].include?(key)
30
29
  # prefix = first association
31
30
  prefix = association if prefix == ''
31
+ joins.push key
32
32
  models.joins_array!(joins)
33
33
  currentModel = key.camelize.singularize.constantize
34
34
  value.each do |k, v|
35
35
  # this fnuction collback
36
- models = relationSearch.call(models, currentModel, k, v, prefix, joins)
36
+ relationSearch.call(models, currentModel, k, v, prefix, joins)
37
37
  end
38
38
  end
39
39
  end
@@ -1,3 +1,3 @@
1
1
  module Baseapi
2
- VERSION = "0.1.26"
2
+ VERSION = "0.1.27"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baseapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.26
4
+ version: 0.1.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moriyuki Arakawa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-19 00:00:00.000000000 Z
11
+ date: 2015-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler