Sha256: 17984ec8c550fcf5fd7b9af21b8fa550a2b6e63e28dff9689b630f1f8f4c7d37
Contents?: true
Size: 622 Bytes
Versions: 1
Compression:
Stored size: 622 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::Glue) File.send(:include, Paperclip::Upfile) ActionController::Base.send(:include, Paperclip::Storage::Database::ControllerClassMethods) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cemeng-paperclip-2.3.6 | lib/paperclip/railtie.rb |