Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Paperclip::Railtie.insert should be wrapped in a initializer block

  • Loading branch information...
commit 17f1dbfa9b2214e07e8d57b59945bdecc32491f4 1 parent c4ca01d
joeljunstrom authored jyurek committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/paperclip/railtie.rb
View
6 lib/paperclip/railtie.rb
@@ -4,8 +4,10 @@ module Paperclip
if defined? Rails::Railtie
require 'rails'
class Railtie < Rails::Railtie
- ActiveSupport.on_load :active_record do
- Paperclip::Railtie.insert
+ 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"
Please sign in to comment.
Something went wrong with that request. Please try again.