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
c65cbf35
Commit
c65cbf35
authored
Nov 01, 2012
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract only_process processing to a method
parent
632ea47a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
lib/paperclip/attachment.rb
+6
-4
No files found.
lib/paperclip/attachment.rb
View file @
c65cbf35
...
@@ -90,10 +90,6 @@ module Paperclip
...
@@ -90,10 +90,6 @@ module Paperclip
ensure_required_accessors!
ensure_required_accessors!
file
=
Paperclip
.
io_adapters
.
for
(
uploaded_file
)
file
=
Paperclip
.
io_adapters
.
for
(
uploaded_file
)
only_process
=
@options
[
:only_process
].
dup
only_process
=
only_process
.
call
(
self
)
if
only_process
.
respond_to?
(
:call
)
only_process
.
map!
(
&
:to_sym
)
self
.
clear
(
*
only_process
)
self
.
clear
(
*
only_process
)
return
nil
if
file
.
nil?
return
nil
if
file
.
nil?
...
@@ -177,6 +173,12 @@ module Paperclip
...
@@ -177,6 +173,12 @@ module Paperclip
@normalized_styles
@normalized_styles
end
end
def
only_process
only_process
=
@options
[
:only_process
].
dup
only_process
=
only_process
.
call
(
self
)
if
only_process
.
respond_to?
(
:call
)
only_process
.
map
(
&
:to_sym
)
end
def
processors
def
processors
processing_option
=
@options
[
:processors
]
processing_option
=
@options
[
:processors
]
...
...
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