Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert_options causes NoMethodError when only :input is defined #51

Open
blakeloverain opened this issue Sep 24, 2016 · 0 comments
Open

Comments

@blakeloverain
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant