Permalink
Browse files

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
  • Loading branch information...
1 parent 96d3f15 commit 2713960dfc2739bcbda7dfeb400bb51913d365a1 @dhh dhh committed Feb 17, 2005
@@ -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)
@@ -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)
@@ -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)
@@ -57,7 +57,7 @@ def manifest
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)

0 comments on commit 2713960

Please sign in to comment.