jeremyboles-graffic 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/graffic.rb +2 -2
- metadata +1 -1
data/lib/graffic.rb
CHANGED
@@ -131,7 +131,7 @@ class Graffic < ActiveRecord::Base
|
|
131
131
|
FileUtils.cp(@file, tmp_file_path)
|
132
132
|
change_state('moved')
|
133
133
|
elsif @file.is_a?(Magick::Image)
|
134
|
-
@image = @file
|
134
|
+
@image = @file.try(:first) || @file
|
135
135
|
upload_without_queue!
|
136
136
|
change_state('uploaded')
|
137
137
|
end
|
@@ -280,7 +280,7 @@ protected
|
|
280
280
|
def run_processors
|
281
281
|
logger.debug("***** Graffic[#{self.id}](#{self.name}): Running processor")
|
282
282
|
unless self.processor.blank?
|
283
|
-
@image = processor.call(image, self)
|
283
|
+
@image = processor.call(image.try(:first) || image, self)
|
284
284
|
raise 'You need to return an image' unless @image.is_a?(Magick::Image)
|
285
285
|
end
|
286
286
|
end
|