rails-add_ons 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8a915102878fc7b3b90f8fa1eaee71e4adcd496
4
- data.tar.gz: a2c2167c5e4f76d9ff265a640d8b4c164e06bd10
3
+ metadata.gz: c9032b619494f0bfa4dc18bfa0c86fe1db0f4071
4
+ data.tar.gz: 7ca731224fd6a2332d76502d507b9ba6e71ffd55
5
5
  SHA512:
6
- metadata.gz: bcd7f4201424418fceac6cf114559bef248ad628275ff7985b15a54875e69df45f2484c1a6ad763f02bff7ae7c68df4da2c6dc25e4441a327bd3bb5b715a12c4
7
- data.tar.gz: a18661c6099af2c0ca8e4c66dcd1b4a98b3dce15aade3d6a703f07af5425d2e57ff6c85bb6938a82ff36ccd232462511faba2962385fa648d97e8a12d68146ef
6
+ metadata.gz: f26676d41f1f05638d9fda5a5bb44798c4e8e9196be7384b54b70e761c8705a11a2c591e84e20808a1346e9d616f1f2956b2ac2b6d1c6c87fa258fc14578fb37
7
+ data.tar.gz: 9f22581830ff0349e7dcc79ce1732ed80d97a232b654172d454f1aa84a6cb1ea2fdc3c2341197d5d622452f51391821402ee0b76db681b645d802d89ea7a2d5f
@@ -118,7 +118,7 @@ module Api
118
118
  when 'order'
119
119
  scope = scope.order(condition)
120
120
  when 'includes'
121
- scope = scope.includes(condition.to_sym)
121
+ scope = scope.includes(condition.map(&:to_sym))
122
122
  else
123
123
  condition_statement = ::Api::ResourcesController::ConditionParser.new(field, condition).condition_statement
124
124
  scope = scope.where(condition_statement)
@@ -11,7 +11,6 @@ module Api
11
11
  }
12
12
 
13
13
  def initialize(field, condition)
14
- # @condition = { field => condition }
15
14
  @field, @condition = field, condition
16
15
  end
17
16
 
@@ -54,7 +53,7 @@ module Api
54
53
  def extract_column_and_operator(string)
55
54
  if string =~ /([\.a-z_]{1,})\(([a-z_]{2,})\)/
56
55
  return $~[1], $~[2]
57
- end
56
+ end
58
57
  end
59
58
 
60
59
  def operator_map
@@ -1,5 +1,5 @@
1
1
  module Rails
2
2
  module AddOns
3
- VERSION = '0.3.2'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-add_ons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-21 00:00:00.000000000 Z
11
+ date: 2017-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails