ragamuffins 1.0.3 → 1.0.4

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: 074a4646bd4731c8c7275704b3d18f4538fb02c6
4
- data.tar.gz: badc80df977fad7eb4ce08a7a49fe0bfe3650f61
3
+ metadata.gz: a08de0c559ae35c1c19325b1b28645a4317bd8f0
4
+ data.tar.gz: 67a9cbb96daf3a85e9401bfeee6c30891154eafe
5
5
  SHA512:
6
- metadata.gz: 348cb5c2f226800a74b0f3ddd66d37d9cec2eaa9e9276e80af02f46811a98ba503e87511f4b7909753d501447a7b6dde28bcb285cc9352abcb4ce77139ac9264
7
- data.tar.gz: e97fa8799b064dcab13a2820fbde9320c7f3be9c6623c6857aa3787a7b32029133932c844b690e3fdf517fe88edb0412e87022a668cc8304d372f2f9fed5691b
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
@@ -1,3 +1,3 @@
1
1
  module Ragamuffins
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
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.3
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: 2014-06-18 00:00:00.000000000 Z
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.2.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: