Skip to content

Instantly share code, notes, and snippets.

@danielfone
Created August 29, 2015 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielfone/b9e0d69c867d22aee430 to your computer and use it in GitHub Desktop.
Save danielfone/b9e0d69c867d22aee430 to your computer and use it in GitHub Desktop.
def post_process(*style_args) #:nodoc:
return if @queued_for_write[:original].nil?
catch :validation_failed do
instance.run_paperclip_callbacks(:post_process) do
instance.run_paperclip_callbacks(:"#{name}_post_process") do
throw :validation_failed if @options[:check_validity_before_processing] && instance.errors.any?
post_process_styles(*style_args)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment