Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed #nil? to #blank? in validation

  • Loading branch information...
commit 567657cbd6dfa49e931e81ee105a2f5599af3600 1 parent 339326d
@jyurek jyurek authored
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 }
Please sign in to comment.
Something went wrong with that request. Please try again.