Sha256: 8d526f5eeec70802c3ef30bb23b55983825ea47d98211ba13116d256c361b97f

Contents?: true

Size: 783 Bytes

Versions: 57

Compression:

Stored size: 783 Bytes

Contents

# Monkey-patch https://github.com/jstorimer/delayed_paperclip/commit/3e0e3451147e96f378cda4695546d9633944cc5c
#
# Remove with delayed_paperclip > 2.4.5.1
require 'delayed_paperclip'

module DelayedPaperclip::Attachment::InstanceMethods
  def post_process_styles_with_processing(*args)
    post_process_styles_without_processing(*args)

    # update_column is available in rails 3.1 instead we can do this to update the attribute without callbacks

    #instance.update_column("#{name}_processing", false) if instance.respond_to?(:"#{name}_processing?")
    if instance.respond_to?(:"#{name}_processing?")
      instance.send("#{name}_processing=", false)
      instance.class.update_all({ "#{name}_processing" => false }, instance.class.primary_key => instance.id)
    end
  end
end

Version data entries

57 entries across 57 versions & 2 rubygems

Version Path
social_stream-0.21.3 documents/lib/delayed_paperclip/social_stream-documents.rb
social_stream-0.21.2 documents/lib/delayed_paperclip/social_stream-documents.rb
social_stream-0.21.1 documents/lib/delayed_paperclip/social_stream-documents.rb
social_stream-0.21.0 documents/lib/delayed_paperclip/social_stream-documents.rb
social_stream-documents-0.11.0 lib/delayed_paperclip/social_stream-documents.rb
social_stream-0.20.2 documents/lib/delayed_paperclip/social_stream-documents.rb
social_stream-documents-0.10.2 lib/delayed_paperclip/social_stream-documents.rb
social_stream-0.20.1 documents/lib/delayed_paperclip/social_stream-documents.rb
social_stream-documents-0.10.1 lib/delayed_paperclip/social_stream-documents.rb
social_stream-0.20.0 documents/lib/delayed_paperclip/social_stream-documents.rb
social_stream-documents-0.10.0 lib/delayed_paperclip/social_stream-documents.rb
social_stream-0.19.3 documents/lib/delayed_paperclip/social_stream-documents.rb
social_stream-documents-0.9.1 lib/delayed_paperclip/social_stream-documents.rb
social_stream-0.19.2 documents/lib/delayed_paperclip/social_stream-documents.rb
social_stream-0.19.1 documents/lib/delayed_paperclip/social_stream-documents.rb
social_stream-0.19.0 documents/lib/delayed_paperclip/social_stream-documents.rb
social_stream-documents-0.9.0 lib/delayed_paperclip/social_stream-documents.rb