lib/erd/railtie.rb in erd-0.1.6 vs lib/erd/railtie.rb in erd-0.2.0
- old
+ new
@@ -1,18 +1,15 @@
require 'rails'
require 'erd/engine'
-
module Erd
autoload :Migrator, 'erd/migrator'
class Railtie < ::Rails::Railtie #:nodoc:
- initializer 'erd' do |app|
- ActiveSupport.on_load(:after_initialize) do
- if Rails.env.development?
- Rails.application.routes.append do
- mount Erd::Engine, :at => '/erd'
- end
+ config.to_prepare do
+ if Rails.env.development?
+ Rails.application.routes.append do
+ mount Erd::Engine, :at => '/erd'
end
end
end
end
end