Skip to content

convert_options causes NoMethodError when only :input is definedΒ #51

@blakeloverain

Description

@blakeloverain

In: lib/paperclip/paperclip_processors/transcoder.rb

Around line 117:

def set_convert_options options
  return options[:convert_options] if options[:convert_options].present?
  options[:convert_options] = {output: {}}
  return options[:convert_options]
end

This fails to add :output to the convert_options when I only have :input defined, so I get this error:

NoMethodError (undefined method `[]=' for nil:NilClass):

paperclip-av-transcoder (0.6.4) lib/paperclip/paperclip_processors/transcoder.rb:37:in `initialize'

referencing:

 @convert_options[:output][:s] = format_geometry(@geometry) if @geometry.present?

A workaround for now is to just have a blank :output=>{} in my paperclip attachment definition, but the logic of assinging a default to the convert_options is erroneous.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions