Commit f3878335 by Gabriele Cirulli Committed by Jon Yurek

Use #to_s on the geometry option in the Thumbnail processor.

This should make it possible to avoid passing a :geometry in the style
definition (when passing it as a hash), thus making Paperclip avoid resizing the
image. This is helpful when you want to perform your own custom
resizing/cropping using :convert_options rather than the default options offered
by Paperclip itself.
parent 5fa9db4d
......@@ -28,7 +28,7 @@ module Paperclip
def initialize(file, options = {}, attachment = nil)
super
geometry = options[:geometry] # this is not an option
geometry = options[:geometry].to_s # this is not an option
@file = file
@crop = geometry[-1,1] == '#'
@target_geometry = options.fetch(:string_geometry_parser, Geometry).parse(geometry)
......
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