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
de693b41
Commit
de693b41
authored
Mar 12, 2014
by
Chris Ell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Hash#fetch to standardize Thumbnail instance variable assignment
parent
9ee29f36
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lib/paperclip/thumbnail.rb
+5
-5
No files found.
lib/paperclip/thumbnail.rb
View file @
de693b41
...
@@ -31,14 +31,14 @@ module Paperclip
...
@@ -31,14 +31,14 @@ module Paperclip
geometry
=
options
[
:geometry
]
# this is not an option
geometry
=
options
[
:geometry
]
# this is not an option
@file
=
file
@file
=
file
@crop
=
geometry
[
-
1
,
1
]
==
'#'
@crop
=
geometry
[
-
1
,
1
]
==
'#'
@target_geometry
=
(
options
[
:string_geometry_parser
]
||
Geometry
).
parse
(
geometry
)
@target_geometry
=
options
.
fetch
(
:string_geometry_parser
,
Geometry
).
parse
(
geometry
)
@current_geometry
=
(
options
[
:file_geometry_parser
]
||
Geometry
).
from_file
(
@file
)
@current_geometry
=
options
.
fetch
(
:file_geometry_parser
,
Geometry
).
from_file
(
@file
)
@source_file_options
=
options
[
:source_file_options
]
@source_file_options
=
options
[
:source_file_options
]
@convert_options
=
options
[
:convert_options
]
@convert_options
=
options
[
:convert_options
]
@whiny
=
options
[
:whiny
].
nil?
?
true
:
options
[
:whiny
]
@whiny
=
options
.
fetch
(
:whiny
,
true
)
@format
=
options
[
:format
]
@format
=
options
[
:format
]
@animated
=
options
[
:animated
].
nil?
?
true
:
options
[
:animated
]
@animated
=
options
.
fetch
(
:animated
,
true
)
@auto_orient
=
options
[
:auto_orient
].
nil?
?
true
:
options
[
:auto_orient
]
@auto_orient
=
options
.
fetch
(
:auto_orient
,
true
)
if
@auto_orient
&&
@current_geometry
.
respond_to?
(
:auto_orient
)
if
@auto_orient
&&
@current_geometry
.
respond_to?
(
:auto_orient
)
@current_geometry
.
auto_orient
@current_geometry
.
auto_orient
end
end
...
...
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