Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fix population of folders instance var on init #2

Merged
merged 1 commit into from

2 participants

Luke Gruber Guillaume Malette
Luke Gruber

allow it to work if options[:folders] not sent

Luke Gruber

Hey Guillaume, I work at Mentel and I ran into a problem with Enhance (VIPTrainers). Otherwise, it works great.

-Luke

Guillaume Malette gmalette merged commit 47a93ab into from
Guillaume Malette
Owner

I'll push a new version of the gem soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 24, 2012
  1. Luke Gruber
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/enhance/enhancer.rb
3  lib/enhance/enhancer.rb
View
@@ -16,7 +16,8 @@ def initialize app, root, options = {}
@app = app
@extensions = [options[:extensions]].flatten || %w( jpg png jpeg gif )
@routes = options[:routes] || %w( images )
- @folders = [options[:folders]].flatten || [File.join(root, "public")]
+ @folders = [options[:folders]].flatten.compact
+ @folders = [File.join(root, "public")] if @folders.blank?
@quality = options[:quality] || 100
@command_path = options[:convert_path] || "#{Paperclip.options[:command_path] if defined?(Paperclip)}"
@command_path += "/" unless @command_path.empty?
Something went wrong with that request. Please try again.