pothoven-attachment_fu 3.2.17 → 3.2.18

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2E4OTFiMjdjMTZkZGRhMjRhMmM4M2I3OWM0YjFiNGIzYzNhOWIyZQ==
4
+ MjYxMDgwMTI0OTMwODNmMjU0NWM1MjFlY2MxZjM0M2MyYjM1NDM1NQ==
5
5
  data.tar.gz: !binary |-
6
- M2NmMDQ0ZjI1NDRiMDg5YjY5NTZhNzZjOGUwZmJlMDc5YmY4ODkwMQ==
6
+ Mjc2MDNkNDU2MDViZjU1Yjc1MjUyZmE4NjM5OTU1MDJiMjBlZjc0Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Zjc1YzZlZWIyM2NmYTkxMTg0OGY2YjcyODFiOGMwMjNjOWE2MTgzMmQ3NDMx
10
- OGI1ZDg5MDdkMTgzOTk1OTQyMjZkODZmZWY2YWNjN2ZjNjk3ZTc1ZTNmNWFi
11
- MjI2NDY3NmJjNTRkYjQ5N2M4MmJhNWVlOGE2YWY5NmQ4MWIyMDI=
9
+ NmRhNDIxZmJhM2E0NzFlNWNmOWMwOWI5ODZlNmY3MWYxNjY4NmJkOGJkMzVh
10
+ MjNjMTNhODI0Y2U2NTBkMjJjOWZjN2Q2NTBjZmU0N2FlMTVhNTE2NDFkZTcx
11
+ Mzk1NWQ5YWQzNDFiODIxNDcyODJhMDdjNTRiYzY5NjEyYjljNjc=
12
12
  data.tar.gz: !binary |-
13
- YzlmYmM3NDI1MzU5NTUwOTE1M2EzYTNiNWM5NTE3M2E0ZTE1YzI5M2EzNDA1
14
- MjZjZGFkMzI2NWQ2OTM4ZDBjZWNhODk1MzNiMGE5ODRiYWVlOWEyMzc2MDc3
15
- ODkzMGFlMzk5MTlkMGFmZTU4ODhhYjU2YjY4ODI4MTAxYmZhYjk=
13
+ OTE4ODYwZWM0YjdiNjAzN2U2MmQzODg3YTg2NzgwYWRmNzI5NTM4OGQyOGM5
14
+ ODBhMTdiZDM3NDM2YmQ1NDA0Njk2ODVhMDc0ZmJkYWRmOWExYmY2YmRmN2Vh
15
+ YmZjYTlkMWE1MmU5MThlNzM5MGRiY2Y5NThkZDcxYWU2NzkzYjA=
data/CHANGELOG CHANGED
@@ -1,6 +1,9 @@
1
+ * May 27, 2016 *
2
+ * Pull in changes from gaugausi to fix for non-existent #where interface in Rails 2.3 *
3
+
1
4
  * Apr 11, 2016 *
2
5
  * Pull in changes from brauliobo to fix RMagick deprication warning *
3
-
6
+
4
7
  * Jul 15, 2015 *
5
8
  * Pull in changes from brauliobo to fix protected_attributes for Rails 4.2 *
6
9
  * Acknowlegement also to malmckay who provided another elegant fix to the protected_attributes problem and I want to thank him for it, but I had to pick 1 *
@@ -30,7 +30,12 @@ module Technoweenie # :nodoc:
30
30
  (db_file || build_db_file).data = temp_data
31
31
  db_file.save!
32
32
  self.db_file_id = db_file.id
33
- self.class.where(:id => id).update_all(:db_file_id => db_file.id)
33
+
34
+ if self.class.respond_to?(:where)
35
+ self.class.where(:id => id).update_all(:db_file_id => db_file.id)
36
+ else
37
+ self.class.update_all({ :db_file_id => db_file.id }, { :id => id })
38
+ end
34
39
  end
35
40
  true
36
41
  end
@@ -477,7 +477,11 @@ module Technoweenie # :nodoc:
477
477
  def find_or_initialize_thumbnail(file_name_suffix)
478
478
  attrs = {thumbnail: file_name_suffix.to_s}
479
479
  attrs[:parent_id] = id if respond_to? :parent_id
480
- thumb = thumbnail_class.where(attrs).first
480
+ thumb = if thumbnail_class.respond_to?(:where)
481
+ thumbnail_class.where(attrs).first
482
+ else
483
+ thumbnail_class.find(:first, :conditions => attrs)
484
+ end
481
485
  unless thumb
482
486
  thumb = thumbnail_class.new
483
487
  attrs.each{ |a, v| thumb[a] = v }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pothoven-attachment_fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.17
4
+ version: 3.2.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Olson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-06-11 00:00:00.000000000 Z
12
+ date: 2016-05-27 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: This is a fork of Rick Olson's attachment_fu adding Ruby 1.9 and Rails
15
15
  3.2 and Rails 4 support as well as some other enhancements.