Skip to content
Browse files

Changed #nil? to #blank? in validation

  • Loading branch information...
1 parent 339326d commit 567657cbd6dfa49e931e81ee105a2f5599af3600 @jyurek jyurek committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/paperclip.rb
View
2 lib/paperclip.rb
@@ -221,7 +221,7 @@ def validates_attachment_content_type name, options = {}
attachment_definitions[name][:validations] << lambda do |attachment, instance|
valid_types = [options[:content_type]].flatten
- unless attachment.original_filename.nil?
+ unless attachment.original_filename.blank?
unless options[:content_type].blank?
content_type = instance[:"#{name}_content_type"]
unless valid_types.any?{|t| t === content_type }

0 comments on commit 567657c

Please sign in to comment.
Something went wrong with that request. Please try again.