Sha256: fae3b719d59fea918a5006bbea82d89a8f7d6117e9687e4050d255d58c5288ef

Contents?: true

Size: 518 Bytes

Versions: 11

Compression:

Stored size: 518 Bytes

Contents

require 'paperclip'

module Paperclip
  if defined? Rails::Railtie
    require 'rails'
    class Railtie < Rails::Railtie
      initializer 'paperclip.insert_into_active_record' do
        ActiveSupport.on_load :active_record do
          Paperclip::Railtie.insert
        end
      end
      rake_tasks do
        load "tasks/paperclip.rake"
      end
    end
  end

  class Railtie
    def self.insert
      ActiveRecord::Base.send(:include, Paperclip)
      File.send(:include, Paperclip::Upfile)
    end
  end
end

Version data entries

11 entries across 11 versions & 6 rubygems

Version Path
olek-paperclip-2.3.3.2 lib/paperclip/railtie.rb
olek-paperclip-2.3.3.1 lib/paperclip/railtie.rb
radiant-paperclipped-extension-0.8.1 vendor/plugins/paperclip/lib/paperclip/railtie.rb
bookis-paperclip-2.3.3.1 lib/paperclip/railtie.rb
bookis-paperclip-2.3.3 lib/paperclip/railtie.rb
olek-paperclip-2.3.3 lib/paperclip/railtie.rb
davidray-paperclip-2.3.3 lib/paperclip/railtie.rb
mbailey-paperclip-2.3.3 lib/paperclip/railtie.rb
mbailey-paperclip-2.3.2.1 lib/paperclip/railtie.rb
mbailey-paperclip-2.3.2 lib/paperclip/railtie.rb
paperclip-2.3.3 lib/paperclip/railtie.rb