Class: DelayedPaperclip::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/delayed_paperclip/railtie.rb,
lib/delayed_paperclip/railtie.rb

Overview

On initialzation, include DelayedPaperclip

Class Method Summary collapse

Class Method Details

.insertObject

Glue includes DelayedPaperclip Class Methods and Instance Methods into ActiveRecord Attachment and URL Generator extends Paperclip



21
22
23
24
25
# File 'lib/delayed_paperclip/railtie.rb', line 21

def self.insert
  ActiveRecord::Base.send(:include, DelayedPaperclip::Glue)
  Paperclip::Attachment.prepend(DelayedPaperclip::Attachment)
  Paperclip::Attachment.default_options[:url_generator] = DelayedPaperclip::UrlGenerator
end