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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14581b93267e780498f4371c8b3a5810e122d1137f42bc6bed45149f2cc0881f
4
- data.tar.gz: 135e7e2cfda92981d940a63fa26c68c092a3560ec5c372aa27c52403b19e0e4c
3
+ metadata.gz: a734a32365b9820781a4c07ebde4473755d3aa6bff70ce8aceff8b755744bd30
4
+ data.tar.gz: c47afbddf30061a36983ce662b23dfea29ba8de161cff43b027f34bdd770832b
5
5
  SHA512:
6
- metadata.gz: 9f172dfd9a404b678faff6a7652f78a92410f68a4bf1237defa5be719448cf5ea8e2b62efddd6dd2853955fd6fa22a08063ba0d6e19d2c1e49248948597f06fd
7
- data.tar.gz: ce9a268f99827c431eab2f05cf12eb72f7d4452766500f16f8d62f274f4ee017daf40bccaa38e8ec652841dafa078a87f39b700afd84d5da4ad816ad2559da74
6
+ metadata.gz: 64acc2def0a5d3aad0850ef26e108ce52573351b3c815b7129e0cd9a3ea8aa54d07dd6a3e2faac7deb4f4bd832781a5bc65b4d7062f57b9ab7eff2606cbe8ad1
7
+ data.tar.gz: b4ac71cb2d4d9de914c8f2a63abe9f2af37bd8715a237f1525b1ff1b582d451d8826cfb808cc5568b23474cdcaed539d3be32c03839aef0c6070390453635ca4
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Services
2
- VERSION = '6.0.1'.freeze
2
+ VERSION = '6.0.2'.freeze
3
3
  end
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.1
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-01 00:00:00.000000000 Z
11
+ date: 2017-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake