Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
24fd0603
Commit
24fd0603
authored
Aug 19, 2016
by
Roderick Monje
Committed by
Tute Costa
Aug 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default to Paperclip::ContentTypeDetector (#2270)
* Add default `content_type_detector` to `UploadedFileAdapter`
parent
a67f2967
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/paperclip/io_adapters/uploaded_file_adapter.rb
+1
-1
spec/paperclip/io_adapters/uploaded_file_adapter_spec.rb
+2
-2
No files found.
lib/paperclip/io_adapters/uploaded_file_adapter.rb
View file @
24fd0603
...
...
@@ -24,7 +24,7 @@ module Paperclip
end
def
content_type_detector
self
.
class
.
content_type_detector
self
.
class
.
content_type_detector
||
Paperclip
::
ContentTypeDetector
end
def
determine_content_type
...
...
spec/paperclip/io_adapters/uploaded_file_adapter_spec.rb
View file @
24fd0603
...
...
@@ -29,7 +29,7 @@ describe Paperclip::UploadedFileAdapter do
end
it
"gets the content type"
do
assert_equal
"image/
x-png-by-browser
"
,
@subject
.
content_type
assert_equal
"image/
png
"
,
@subject
.
content_type
end
it
"gets the file's size"
do
...
...
@@ -98,7 +98,7 @@ describe Paperclip::UploadedFileAdapter do
end
it
"gets the content type"
do
assert_equal
"image/
x-png-by-browser
"
,
@subject
.
content_type
assert_equal
"image/
png
"
,
@subject
.
content_type
end
it
"gets the file's size"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment