Skip to content

Commit

Permalink
Add documentation for strange content type received from Internet Exp…
Browse files Browse the repository at this point in the history
…lorer

Closes thoughtbot#68
  • Loading branch information
sikachu committed Jun 30, 2011
1 parent f7a5b91 commit d199e58
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/paperclip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@ def validates_attachment_presence name, options = {}
# NOTE: If you do not specify an [attachment]_content_type field on your
# model, content_type validation will work _ONLY upon assignment_ and
# re-validation after the instance has been reloaded will always succeed.
#
# WARNING: There's also some known issue with the content type sent by
# Internet Explorer might not be the same as other browsers. You can look at
# https://github.com/thoughtbot/paperclip/issues/68 for more information.
def validates_attachment_content_type name, options = {}
validation_options = options.dup
allowed_types = [validation_options[:content_type]].flatten
Expand Down Expand Up @@ -401,7 +405,7 @@ def destroy_attached_files
Paperclip.log("Deleting attachments.")
each_attachment do |name, attachment|
attachment.send(:queue_existing_for_delete)
attachment.send(:flush_deletes)
attachment.send(:flush_deletes)
end
end
end
Expand Down

0 comments on commit d199e58

Please sign in to comment.