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 +5 -5
- data/lib/sequence_on/sequenced_on.rb +6 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3aa62bb7a536c393c87c1e1b301c66a843aece721e9654de0c47595d09809632
|
4
|
+
data.tar.gz: df56836b57565a113e844aed981a5555406a1407d7cf12b0e00b109bd3b17231
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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.
|
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:
|
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.
|
83
|
+
rubygems_version: 2.7.6
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: Flexible acts_as_sequenced replacement
|