diff options
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 6f1b7e2218..28a1a0b0f5 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -96,11 +96,9 @@ module Rails end def create_root - self.destination_root = File.expand_path(app_path, destination_root) valid_const? empty_directory '.' - set_default_accessors! FileUtils.cd(destination_root) unless options[:pretend] end @@ -111,6 +109,7 @@ module Rails end def set_default_accessors! + self.destination_root = File.expand_path(app_path, destination_root) self.rails_template = case options[:template] when /^https?:\/\// options[:template] diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index db6b11abfa..4e92f56b2d 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -162,6 +162,7 @@ module Rails end end + public_task :set_default_accessors! public_task :create_root def create_root_files |