Commit 5adeb849 by jyurek

Stupid stupid scope problem.

git-svn-id: https://svn.thoughtbot.com/plugins/paperclip/trunk@187 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
parent d6bc3060
......@@ -24,7 +24,7 @@ module Thoughtbot #:nodoc:
PAPERCLIP_OPTIONS = {
:whiny_deletes => false,
:whiny_thumbnails => true
:whiny_thumbnails => true,
:image_magick_path => "/usr/local/bin"
}
......@@ -316,7 +316,7 @@ module Thoughtbot #:nodoc:
operator = geometry[-1,1]
geometry, crop_geometry = geometry_for_crop(geometry, orig_io) if operator == '#'
begin
command = "#{options[:image_magick_path]}/convert - -scale '#{geometry}' #{operator == '#' ? "-crop '#{crop_geometry}'" : ""} -"
command = "#{::Thoughtbot::Paperclip.options[:image_magick_path]}/convert - -scale '#{geometry}' #{operator == '#' ? "-crop '#{crop_geometry}'" : ""} -"
ActiveRecord::Base.logger.info("Thumbnail: '#{command}'")
thumb = IO.popen(command, "w+") do |io|
orig_io.rewind
......@@ -336,7 +336,7 @@ module Thoughtbot #:nodoc:
end
def geometry_for_crop geometry, orig_io
IO.popen("#{options[:image_magick_path]}/identify -", "w+") do |io|
IO.popen("#{::Thoughtbot::Paperclip.options[:image_magick_path]}/identify -", "w+") do |io|
orig_io.rewind
io.write(orig_io.read)
io.close_write
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment