Permalink
Browse files

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

  • Loading branch information...
1 parent c4ca01d commit 17f1dbfa9b2214e07e8d57b59945bdecc32491f4 joeljunstrom committed with jyurek Jun 9, 2010
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"

0 comments on commit 17f1dbf

Please sign in to comment.