ragamuffins 1.0.6 → 1.0.7
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: cfe142ef82e7fb26ac3ab6d9904552fbd5a63c62
|
4
|
+
data.tar.gz: 45a9e869bc1548c4f2f1f598c144b7fa66123ea9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a3cb3f350cccb213f69e25ca5cbd83aeb7c9bfea9d484d407c73a7d144398ca17403909423f6b4912751c2ae1f42788975926daba0bb23a38215a84618da5a6
|
7
|
+
data.tar.gz: 46fb047fa962418a1c4e0b7a178b0a19ac01fc3fb61b8edbd0c3155dfdce8b9bb17d188085fcb5f1eef1a574c697f4f185ae05c821901584643e32365db8ca48
|
@@ -7,10 +7,10 @@ module Ragamuffins
|
|
7
7
|
# Fetch all the deleted ids from the backend, and return them as an array
|
8
8
|
# Model.deleted_ids = []
|
9
9
|
def self.show_deleted_ids(ids = [])
|
10
|
-
return [] if ids == nil
|
10
|
+
return [] if ids == nil || ids.empty?
|
11
11
|
# Because params are always strings, we double check that (the first to_s) and then make sure that we convert the ids to a string as well
|
12
12
|
# This allows us to make sure that we can handle UUIDs as well.
|
13
|
-
ids.collect{|s| s.to_s} - self.where("#{table_name}.id IN (?)", ids).
|
13
|
+
ids.collect{|s| s.to_s} - self.where("#{table_name}.id IN (?)", ids).pluck(:id).map(&:to_s)
|
14
14
|
|
15
15
|
#
|
16
16
|
# if we were passed some ids that forms a bad query,
|
data/lib/ragamuffins/version.rb
CHANGED