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
a6095d0c
Commit
a6095d0c
authored
Aug 09, 2009
by
Damian Janowski
Committed by
Jon Yurek
Aug 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Thumbnail work without ActiveSupport.
(cherry picked from commit 43946120a6231be06d59c8f28969946c213e6872)
parent
b8c85cdf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/paperclip/thumbnail.rb
+2
-2
No files found.
lib/paperclip/thumbnail.rb
View file @
a6095d0c
...
...
@@ -33,7 +33,7 @@ module Paperclip
# Returns true if the image is meant to make use of additional convert options.
def
convert_options?
not
@convert_options
.
blank
?
!
@convert_options
.
nil?
&&
!
@convert_options
.
empty
?
end
# Performs the conversion of the +file+ into a thumbnail. Returns the Tempfile
...
...
@@ -64,7 +64,7 @@ module Paperclip
def
transformation_command
scale
,
crop
=
@current_geometry
.
transformation_to
(
@target_geometry
,
crop?
)
trans
=
""
trans
<<
" -resize
\"
#{
scale
}
\"
"
unless
scale
.
blank
?
trans
<<
" -resize
\"
#{
scale
}
\"
"
unless
scale
.
nil?
||
scale
.
empty
?
trans
<<
" -crop
\"
#{
crop
}
\"
+repage"
if
crop
trans
<<
"
#{
convert_options
}
"
if
convert_options?
trans
...
...
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