uuids 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uuids/base/has_uuids.rb +1 -0
- data/lib/uuids/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/lib/uuids/base_spec.rb +1 -0
- 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: bfc2367f33f47dad9657d2967ce4b748e250d74d
|
4
|
+
data.tar.gz: 65bdc11b1153c8a642d8db7cf955551d40f30598
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3727f692aa29305a27f71e6f4a014cecd51f44994093d8045582e69a15124e6a366122a66d135e1536d294ae7ec8a94652b259a0a6045e84a70a49bff85e082b
|
7
|
+
data.tar.gz: b84266c8b36f76e2540c7706dc31656606c1eb61dbfbc9fc1eeb3a5e149e69e9b6d65ef9ee7d1080fbb1f696fb3ac9aebcd950695cbc19a91908818bf2043e8f
|
data/lib/uuids/base/has_uuids.rb
CHANGED
@@ -25,6 +25,7 @@ module Uuids
|
|
25
25
|
# @param values [Array<String>] a list of uuids to select records by.
|
26
26
|
# @return [ActiveRecord::Relation] scope.
|
27
27
|
def by_uuid(*values)
|
28
|
+
return all unless values.any?
|
28
29
|
first_value = values.first
|
29
30
|
list = first_value.is_a?(Array) ? first_value : values
|
30
31
|
joins(:uuids).where(uuids_uuids: { value: list }).uniq
|
data/lib/uuids/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/spec/lib/uuids/base_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uuids
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kozin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|