polyblock 0.3.2 → 0.3.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27aeb630a9127e2fead39331c1bf6b2a3c0fc5d5
|
4
|
+
data.tar.gz: c1c7040117197373034137d871eb1b128893ba8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6c5c178a314336d52048d55b81a26f9e44ac8254663ef7a26fa324e105ebcf403d68ad0a601a309cc37514d167c95704083654276313de2a35465c7c1b78f74
|
7
|
+
data.tar.gz: 6c459f102065a3cd910c2857889364449f5208cad89659da111dcb108cdb7fc5b9aa7f6109c0045e267af5994f1fa357bf44b298fcdb12eb67e00fa56296de51
|
@@ -20,12 +20,13 @@ module Polyblock
|
|
20
20
|
matches = Polyblock::Block.where :name => name
|
21
21
|
pb_exists = matches.any?
|
22
22
|
pb = pb_exists ? matches.first : Polyblock::Block.new({:name => name})
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
23
|
+
if pb_exists
|
24
|
+
pb_id = pb.id
|
25
|
+
else
|
26
|
+
nextId = Polyblock::Block.count + 1
|
27
|
+
nextId += 1 while Polyblock::Block.where(:id => nextId).any?
|
28
|
+
pb_id = nextId
|
29
|
+
end
|
29
30
|
end
|
30
31
|
|
31
32
|
# Build output tag
|
data/lib/polyblock/version.rb
CHANGED
Binary file
|