lib/paperclip/style.rb in paperclip-2.4.2 vs lib/paperclip/style.rb in paperclip-2.4.3

- old
+ new

@@ -30,16 +30,16 @@ # (which method (in the attachment) will call any supplied procs) # There is an important change of interface here: a style rule can set its own processors # by default we behave as before, though. # if a proc has been supplied, we call it here def processors - @processors.respond_to?(:call) ? @processors.call(attachment.instance) : (@processors || attachment.processors) + @processors.respond_to?(:call) ? @processors.call(attachment.instance) : (@processors || attachment.options.processors) end # retrieves from the attachment the whiny setting def whiny - attachment.whiny + attachment.options.whiny end # returns true if we're inclined to grumble def whiny? !!whiny @@ -72,10 +72,10 @@ end args end # Supports getting and setting style properties with hash notation to ensure backwards-compatibility - # eg. @attachment.styles[:large][:geometry]@ will still work + # eg. @attachment.options.styles[:large][:geometry]@ will still work def [](key) if [:name, :convert_options, :whiny, :processors, :geometry, :format, :animated, :source_file_options].include?(key) send(key) elsif defined? @other_args[key] @other_args[key]