pothoven-attachment_fu 3.2.11 → 3.2.12
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.
- data/CHANGELOG +3 -0
- data/lib/technoweenie/attachment_fu.rb +10 -4
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -325,7 +325,7 @@ module Technoweenie # :nodoc:
|
|
325
325
|
:filename => thumbnail_name_for(file_name_suffix),
|
326
326
|
:thumbnail_resize_options => size
|
327
327
|
}
|
328
|
-
if defined?(Rails) && Rails::VERSION::MAJOR
|
328
|
+
if defined?(Rails) && Rails::VERSION::MAJOR == 3
|
329
329
|
# assign_attributes API in Rails 2.3 doesn't take a second argument
|
330
330
|
assign_attributes_args << { :without_protection => true }
|
331
331
|
end
|
@@ -475,9 +475,15 @@ module Technoweenie # :nodoc:
|
|
475
475
|
|
476
476
|
# Initializes a new thumbnail with the given suffix.
|
477
477
|
def find_or_initialize_thumbnail(file_name_suffix)
|
478
|
-
|
479
|
-
|
480
|
-
|
478
|
+
if defined?(Rails) && Rails::VERSION::MAJOR >= 4
|
479
|
+
respond_to?(:parent_id) ?
|
480
|
+
thumbnail_class.find_or_initialize_by(:thumbnail => file_name_suffix.to_s, :parent_id => id) :
|
481
|
+
thumbnail_class.find_or_initialize_by(:thumbnail => file_name_suffix.to_s)
|
482
|
+
else
|
483
|
+
respond_to?(:parent_id) ?
|
484
|
+
thumbnail_class.find_or_initialize_by_thumbnail_and_parent_id(file_name_suffix.to_s, id) :
|
485
|
+
thumbnail_class.find_or_initialize_by_thumbnail(file_name_suffix.to_s)
|
486
|
+
end
|
481
487
|
end
|
482
488
|
|
483
489
|
# Stub for a #process_attachment method in a processor
|
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.
|
4
|
+
version: 3.2.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-04-17 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: This is a fork of Rick Olson's attachment_fu adding Ruby 1.9 and Rails
|
16
16
|
3.2 support as well as some other enhancements.
|