diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-17 19:40:58 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-17 19:40:58 +0000 |
commit | 2713960dfc2739bcbda7dfeb400bb51913d365a1 (patch) | |
tree | 80e587221b7db212f23c186692884c36ad9657ff /railties/lib | |
parent | 96d3f152227b31e1ca2f0ac2814dda741dccaaea (diff) | |
download | rails-2713960dfc2739bcbda7dfeb400bb51913d365a1.tar.gz rails-2713960dfc2739bcbda7dfeb400bb51913d365a1.tar.bz2 rails-2713960dfc2739bcbda7dfeb400bb51913d365a1.zip |
Check class path for conflicts on generation #640 [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
4 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails_generator/generators/components/controller/controller_generator.rb b/railties/lib/rails_generator/generators/components/controller/controller_generator.rb index d537031fea..32bc5c5842 100644 --- a/railties/lib/rails_generator/generators/components/controller/controller_generator.rb +++ b/railties/lib/rails_generator/generators/components/controller/controller_generator.rb @@ -2,7 +2,7 @@ class ControllerGenerator < Rails::Generator::NamedBase def manifest record do |m| # Check for class naming collisions. - m.class_collisions "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper" + m.class_collisions class_path, "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper" # Controller, helper, views, and test directories. m.directory File.join('app/controllers', class_path) diff --git a/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb b/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb index d8ddb43644..edb0606ee2 100644 --- a/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb +++ b/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb @@ -2,7 +2,7 @@ class MailerGenerator < Rails::Generator::NamedBase def manifest record do |m| # Check for class naming collisions. - m.class_collisions class_name, "#{class_name}Test" + m.class_collisions class_path, class_name, "#{class_name}Test" # Mailer, view, test, and fixture directories. m.directory File.join('app/models', class_path) diff --git a/railties/lib/rails_generator/generators/components/model/model_generator.rb b/railties/lib/rails_generator/generators/components/model/model_generator.rb index c3407ca283..a978b96b1c 100644 --- a/railties/lib/rails_generator/generators/components/model/model_generator.rb +++ b/railties/lib/rails_generator/generators/components/model/model_generator.rb @@ -2,7 +2,7 @@ class ModelGenerator < Rails::Generator::NamedBase def manifest record do |m| # Check for class naming collisions. - m.class_collisions class_name, "#{class_name}Test" + m.class_collisions class_path, class_name, "#{class_name}Test" # Model, test, and fixture directories. m.directory File.join('app/models', class_path) diff --git a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb index 883bae7d3d..67f17dc874 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb @@ -57,7 +57,7 @@ class ScaffoldGenerator < Rails::Generator::NamedBase m.dependency 'model', [@name], :collision => :skip # Check for class naming collisions. - m.class_collisions "#{controller_class_name}Controller", "#{controller_class_name}ControllerTest", "#{controller_class_name}Helper" + m.class_collisions controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}ControllerTest", "#{controller_class_name}Helper" # Controller, helper, views, and test directories. m.directory File.join('app/controllers', controller_class_path) |