sequence_on 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sequence_on/sequenced_on.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b610ca5c4ab725754697b7d68306a0d6361d28ed
|
4
|
+
data.tar.gz: fe6c807b9d340814f3b144e32909fa0091cc06b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 638b46f917064f5dc9b9395cbbd1c042c5c75d0c21d07a10a2a5dbf1a7aae7e1354a53eee6fe7bcf9af936eaacc063a1c55f1fa0ae2c1cc2a7b84279b8029fc7
|
7
|
+
data.tar.gz: 80c8b242962c51afc6de7de9afd8fb4a6b9ec9cf49d397885208d72612ec4231d52f799f841c38c6a50b6326aed729fb943f1e774c89938216282a61050a59b0
|
@@ -23,7 +23,7 @@ module SequenceOn
|
|
23
23
|
return if self.sequential_id
|
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
|
-
last_record = if
|
26
|
+
last_record = if self.persisted?
|
27
27
|
self.class.class_exec(self, &options[:lmd]).
|
28
28
|
order("#{options[:column]} DESC").
|
29
29
|
where("NOT id = ?", self.id).
|
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.7
|
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-05-
|
11
|
+
date: 2017-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|