Commit 24fd0603 by Roderick Monje Committed by Tute Costa

Default to Paperclip::ContentTypeDetector (#2270)

* Add default `content_type_detector` to `UploadedFileAdapter`
parent a67f2967
...@@ -24,7 +24,7 @@ module Paperclip ...@@ -24,7 +24,7 @@ module Paperclip
end end
def content_type_detector def content_type_detector
self.class.content_type_detector self.class.content_type_detector || Paperclip::ContentTypeDetector
end end
def determine_content_type def determine_content_type
......
...@@ -29,7 +29,7 @@ describe Paperclip::UploadedFileAdapter do ...@@ -29,7 +29,7 @@ describe Paperclip::UploadedFileAdapter do
end end
it "gets the content type" do it "gets the content type" do
assert_equal "image/x-png-by-browser", @subject.content_type assert_equal "image/png", @subject.content_type
end end
it "gets the file's size" do it "gets the file's size" do
...@@ -98,7 +98,7 @@ describe Paperclip::UploadedFileAdapter do ...@@ -98,7 +98,7 @@ describe Paperclip::UploadedFileAdapter do
end end
it "gets the content type" do it "gets the content type" do
assert_equal "image/x-png-by-browser", @subject.content_type assert_equal "image/png", @subject.content_type
end end
it "gets the file's size" do it "gets the file's size" do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment