services 6.0.1 → 6.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/services/query.rb +3 -1
- data/lib/services/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a734a32365b9820781a4c07ebde4473755d3aa6bff70ce8aceff8b755744bd30
|
4
|
+
data.tar.gz: c47afbddf30061a36983ce662b23dfea29ba8de161cff43b027f34bdd770832b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64acc2def0a5d3aad0850ef26e108ce52573351b3c815b7129e0cd9a3ea8aa54d07dd6a3e2faac7deb4f4bd832781a5bc65b4d7062f57b9ab7eff2606cbe8ad1
|
7
|
+
data.tar.gz: b4ac71cb2d4d9de914c8f2a63abe9f2af37bd8715a237f1525b1ff1b582d451d8826cfb808cc5568b23474cdcaed539d3be32c03839aef0c6070390453635ca4
|
data/lib/services/query.rb
CHANGED
@@ -29,7 +29,7 @@ module Services
|
|
29
29
|
|
30
30
|
object_table_id = "#{object_class.table_name}.id"
|
31
31
|
|
32
|
-
special_conditions = conditions.extract!(:order, :limit, :page, :per_page)
|
32
|
+
special_conditions = conditions.extract!(:id_not, :order, :limit, :page, :per_page)
|
33
33
|
special_conditions[:order] = object_table_id unless special_conditions.has_key?(:order)
|
34
34
|
|
35
35
|
scope = conditions.delete(:scope).try(:dup) || object_class.public_send(ActiveRecord::VERSION::MAJOR == 3 ? :scoped : :all)
|
@@ -60,6 +60,8 @@ module Services
|
|
60
60
|
|
61
61
|
special_conditions.each do |k, v|
|
62
62
|
case k
|
63
|
+
when :id_not
|
64
|
+
scope = scope.where.not(id: v)
|
63
65
|
when :order
|
64
66
|
next unless v
|
65
67
|
order = case v
|
data/lib/services/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Meurer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|