lib/paperclip/railtie.rb in kt-paperclip-5.4.0 vs lib/paperclip/railtie.rb in kt-paperclip-6.2.0

- old
+ new

@@ -1,13 +1,13 @@ -require 'paperclip' -require 'paperclip/schema' +require "paperclip" +require "paperclip/schema" module Paperclip - require 'rails' + require "rails" class Railtie < Rails::Railtie - initializer 'paperclip.insert_into_active_record' do |app| + initializer "paperclip.insert_into_active_record" do |app| ActiveSupport.on_load :active_record do Paperclip::Railtie.insert end if app.config.respond_to?(:paperclip_defaults) @@ -22,10 +22,10 @@ def self.insert Paperclip.options[:logger] = Rails.logger if defined?(ActiveRecord) Paperclip.options[:logger] = ActiveRecord::Base.logger - ActiveRecord::Base.send(:include, Paperclip::Glue) + ActiveRecord::Base.include Paperclip::Glue end end end end