Permalink
Browse files

initialize our instance variables

  • Loading branch information...
1 parent 65d2a60 commit 8662722f4fea34259da4d37abd6c55ec717f9d2a @tenderlove tenderlove committed May 22, 2012
Showing with 14 additions and 2 deletions.
  1. +14 −2 railties/lib/rails/engine.rb
@@ -340,6 +340,18 @@ class Engine < Railtie
autoload :Configuration, "rails/engine/configuration"
autoload :Railties, "rails/engine/railties"
+ def initialize
+ @_all_autoload_paths = nil
+ @_all_load_paths = nil
+ @app = nil
+ @config = nil
+ @env_config = nil
+ @helpers = nil
+ @railties = nil
+ @routes = nil
+ super
+ end
+
def load_generators(app=self)
initialize_generators
railties.all { |r| r.load_generators(app) }
@@ -615,14 +627,14 @@ def load_seed
end
end
- protected
+ protected
def initialize_generators
require "rails/generators"
end
def routes?
- defined?(@routes) && @routes
+ @routes
end
def has_migrations?

0 comments on commit 8662722

Please sign in to comment.