ragamuffins 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a08de0c559ae35c1c19325b1b28645a4317bd8f0
|
4
|
+
data.tar.gz: 67a9cbb96daf3a85e9401bfeee6c30891154eafe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05d4e9919cde10c3ee0bbd4ab8b32f07fdc438a4bfa764092792ff642636fac5d4ec21cd3887b730a116bc5cc26dba64fc806d814f53d99bb92b24d4bd816fc4
|
7
|
+
data.tar.gz: fd32eeac13dab1fac1e4746d2b05974a0c1eb35423120b09d60c5cc156bb5e9943ae3161ddb378843be7285025e2befdf2e563a5664404e69bca1cec5e2c3897
|
@@ -8,11 +8,12 @@ module Ragamuffins
|
|
8
8
|
# Model.deleted_ids = []
|
9
9
|
def self.show_deleted_ids(ids = [])
|
10
10
|
return [] if ids == nil
|
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
|
+
# 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).map(&:id).map(&:to_s)
|
11
14
|
|
12
|
-
ids.collect{|s| s.to_i} - self.where("#{table_name}.id IN (?)", ids).map(&:id)
|
13
|
-
|
14
15
|
#
|
15
|
-
# if we were passed some ids that forms a bad query,
|
16
|
+
# if we were passed some ids that forms a bad query,
|
16
17
|
# just return them all as deleted instead of causing a 500.
|
17
18
|
# for example using "asdf" as an id.
|
18
19
|
rescue ActiveRecord::StatementInvalid
|
data/lib/ragamuffins/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ragamuffins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Norman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
requirements: []
|
168
168
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.
|
169
|
+
rubygems_version: 2.4.6
|
170
170
|
signing_key:
|
171
171
|
specification_version: 4
|
172
172
|
summary: Find your orphans
|
@@ -211,4 +211,3 @@ test_files:
|
|
211
211
|
- spec/factories/test_models.rb
|
212
212
|
- spec/models/test_model_spec.rb
|
213
213
|
- spec/spec_helper.rb
|
214
|
-
has_rdoc:
|