Permalink
Browse files

Require the top file and autoload Base class

The generators entry point file is rails/generators so we need to make
sure uers will be able to use the generators when requiring that file.

Fixes #12802
  • Loading branch information...
1 parent 3bec160 commit 4f006122870abc2433e6ffd24b9aa4ce614bd7dc @rafaelfranca rafaelfranca committed Nov 9, 2013
@@ -15,6 +15,7 @@ module Rails
module Generators
autoload :Actions, 'rails/generators/actions'
autoload :ActiveModel, 'rails/generators/active_model'
+ autoload :Base, 'rails/generators/base'
autoload :Migration, 'rails/generators/migration'
autoload :NamedBase, 'rails/generators/named_base'
autoload :ResourceHelpers, 'rails/generators/resource_helpers'
@@ -3,7 +3,7 @@
require 'rails/version' unless defined?(Rails::VERSION)
require 'open-uri'
require 'uri'
-require 'rails/generators/base'
+require 'rails/generators'
require 'active_support/core_ext/array/extract_options'
module Rails
@@ -7,8 +7,6 @@
exit
end
-require 'rails/generators'
-
module Rails
module Generators
class Error < Thor::Error # :nodoc:

0 comments on commit 4f00612

Please sign in to comment.