sequence_on 0.0.8 → 0.0.9

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
- SHA1:
3
- metadata.gz: e97dce7a7f9809737b7fae8b915e54e22f3beae3
4
- data.tar.gz: bb16124a73b33420fd7de13cab0384ff49083419
2
+ SHA256:
3
+ metadata.gz: 3aa62bb7a536c393c87c1e1b301c66a843aece721e9654de0c47595d09809632
4
+ data.tar.gz: df56836b57565a113e844aed981a5555406a1407d7cf12b0e00b109bd3b17231
5
5
  SHA512:
6
- metadata.gz: 3c101797f065cda5c73a807275d20a759c8abef47061c63df508484da27c321225bd83e5cddc150cb13baad7cfc41d57a3a2b9a984b8d5c4284b51d84121afa0
7
- data.tar.gz: ce2350213fe90e58872f2bd37ec39c83b35b6eb6cfdc864e2542b859462d7e0ecefce10fded255bd34620f4d2a5c34ed9f9bf0e62474a9fa55eacb1eaca06772
6
+ metadata.gz: 17e45f0e1848dae93156d7aafcda729536a83e97247a042dc47659934b01cdc59afd231f6431f5970a5d41da15f3784e0c423471d0f849289d85fc3e10acec46
7
+ data.tar.gz: 5595fcc9f1fa08ebd6ef05116d88b9eb1d6059b69184c055d769f0bc33d10fe5d8b52d9a6fbc0011e0a88e91303237e1692b65af6b27643e0865c09604c6cbef
@@ -24,12 +24,16 @@ module SequenceOn
24
24
  options = self.class.sequence_options
25
25
  self.class.connection.execute("LOCK TABLE #{self.class.table_name} IN EXCLUSIVE MODE") if postgresql?
26
26
  last_record = if self.persisted?
27
- self.class.class_exec(self, &options[:lmd]).
27
+ self.class
28
+ .unscoped
29
+ .class_exec(self, &options[:lmd]).
28
30
  order("#{options[:column]} DESC").
29
31
  where("NOT id = ?", self.id).
30
32
  first
31
33
  else
32
- self.class.class_exec(self, &options[:lmd]).
34
+ self.class
35
+ .unscoped
36
+ .class_exec(self, &options[:lmd]).
33
37
  order("#{options[:column]} DESC").
34
38
  first
35
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequence_on
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy SEBAN
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-08 00:00:00.000000000 Z
11
+ date: 2018-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.4.5
83
+ rubygems_version: 2.7.6
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Flexible acts_as_sequenced replacement