Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Convert attachment definition keys to strings for comparison

  • Loading branch information...
commit fe06db456dddab26948abe603cdd35d9c53d4fa4 1 parent e705b73
@jyurek jyurek authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/tasks/paperclip.rake
View
2  lib/tasks/paperclip.rake
@@ -10,7 +10,7 @@ module Paperclip
klass = Paperclip.class_for(klass.to_s)
name = ENV['ATTACHMENT'] || ENV['attachment']
raise "Class #{klass.name} has no attachments specified" unless klass.respond_to?(:attachment_definitions)
- if !name.blank? && klass.attachment_definitions.keys.include?(name)
+ if !name.blank? && klass.attachment_definitions.keys.map(&:to_s).include?(name.to_s)
[ name ]
else
klass.attachment_definitions.keys
Please sign in to comment.
Something went wrong with that request. Please try again.