Sha256: 02b74f09d4edbe256d3238450ea757f7953edb466550a30f1465057d6291fbbe

Contents?: true

Size: 518 Bytes

Versions: 3

Compression:

Stored size: 518 Bytes

Contents

require 'delayed_paperclip'

module DelayedPaperclip
  if defined? Rails::Railtie
    require 'rails'
    class Railtie < Rails::Railtie
      initializer 'delayed_paperclip.insert_into_active_record' do
        ActiveSupport.on_load :paperclip do
          DelayedPaperclip::Railtie.insert
        end
      end
    end
  end

  class Railtie
    def self.insert
      ActiveRecord::Base.send(:include, DelayedPaperclip::Glue)
      Paperclip::Attachment.send :include, DelayedPaperclip::Attachment
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
delayed_paperclip-2.4.5.0 lib/delayed_paperclip/railtie.rb
delayed_paperclip-2.4.4.0 lib/delayed_paperclip/railtie.rb
delayed_paperclip-2.4.3.0 lib/delayed_paperclip/railtie.rb