Skip to content

Commit

Permalink
Convert attachment definition keys to strings for comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Yurek committed Apr 24, 2012
1 parent e705b73 commit fe06db4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/paperclip.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe06db4

Please sign in to comment.