Commit 17f1dbfa by joeljunstrom Committed by Jon Yurek

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

parent c4ca01d2
...@@ -4,8 +4,10 @@ module Paperclip ...@@ -4,8 +4,10 @@ module Paperclip
if defined? Rails::Railtie if defined? Rails::Railtie
require 'rails' require 'rails'
class Railtie < Rails::Railtie class Railtie < Rails::Railtie
ActiveSupport.on_load :active_record do initializer 'paperclip.insert_into_active_record' do
Paperclip::Railtie.insert ActiveSupport.on_load :active_record do
Paperclip::Railtie.insert
end
end end
rake_tasks do rake_tasks do
load "tasks/paperclip.rake" load "tasks/paperclip.rake"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment