aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-10-27 14:31:49 -0300
committerAaron Patterson <aaron.patterson@gmail.com>2013-10-27 14:37:04 -0300
commitb7ca9b52fe23f979ca5c60039faeac3d844e3ee3 (patch)
tree028b64320db225c6531c07c5d8f9f5a2c1e1a624 /railties/lib
parent41047172c3044ccc2762a4a8b6b3a8437fccf2d0 (diff)
downloadrails-b7ca9b52fe23f979ca5c60039faeac3d844e3ee3.tar.gz
rails-b7ca9b52fe23f979ca5c60039faeac3d844e3ee3.tar.bz2
rails-b7ca9b52fe23f979ca5c60039faeac3d844e3ee3.zip
set accessors in the set_accessors! method
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/app_base.rb3
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb1
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