Commit c65cbf35 by Jon Yurek

Extract only_process processing to a method

parent 632ea47a
...@@ -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]
......
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