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