diff options
Diffstat (limited to 'railties/lib/rails/generators/base.rb')
-rw-r--r-- | railties/lib/rails/generators/base.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index 8aec8bc8f9..dc1d4fa181 100644 --- a/railties/lib/rails/generators/base.rb +++ b/railties/lib/rails/generators/base.rb @@ -7,7 +7,7 @@ rescue LoadError exit end -require 'rails/generators/actions' +require 'rails/generators' module Rails module Generators @@ -211,7 +211,7 @@ module Rails return unless base_name && generator_name return unless default_generator_root path = File.join(default_generator_root, 'templates') - path if File.exists?(path) + path if File.exist?(path) end # Returns the base root for a common set of generators. This is used to dynamically @@ -368,12 +368,12 @@ module Rails source_root && File.expand_path("../USAGE", source_root), default_generator_root && File.join(default_generator_root, "USAGE") ] - paths.compact.detect { |path| File.exists? path } + paths.compact.detect { |path| File.exist? path } end def self.default_generator_root path = File.expand_path(File.join(base_name, generator_name), base_root) - path if File.exists?(path) + path if File.exist?(path) end end |