Permalink
Browse files

Remove the class_path from the collisions test.

The class_path is often taken already in situations like Admin namespaces etc.
  • Loading branch information...
1 parent 3e9fc27 commit 09c1718198c58d2e14d267cbd771b4853b311da1 @NZKoz NZKoz committed Oct 14, 2008
View
2 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_path, "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper"
+ m.class_collisions "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper"
# Controller, helper, views, and test directories.
m.directory File.join('app/controllers', class_path)
View
2 .../lib/rails_generator/generators/components/integration_test/integration_test_generator.rb
@@ -4,7 +4,7 @@ class IntegrationTestGenerator < Rails::Generator::NamedBase
def manifest
record do |m|
# Check for class naming collisions.
- m.class_collisions class_path, class_name, "#{class_name}Test"
+ m.class_collisions class_name, "#{class_name}Test"
# integration test directory
m.directory File.join('test/integration', class_path)
View
2 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_path, class_name, "#{class_name}Test"
+ m.class_collisions class_name, "#{class_name}Test"
# Mailer, view, test, and fixture directories.
m.directory File.join('app/models', class_path)
View
2 railties/lib/rails_generator/generators/components/model/model_generator.rb
@@ -4,7 +4,7 @@ class ModelGenerator < Rails::Generator::NamedBase
def manifest
record do |m|
# Check for class naming collisions.
- m.class_collisions class_path, class_name, "#{class_name}Test"
+ m.class_collisions class_name, "#{class_name}Test"
# Model, test, and fixture directories.
m.directory File.join('app/models', class_path)
View
2 railties/lib/rails_generator/generators/components/observer/observer_generator.rb
@@ -2,7 +2,7 @@ class ObserverGenerator < Rails::Generator::NamedBase
def manifest
record do |m|
# Check for class naming collisions.
- m.class_collisions class_path, "#{class_name}Observer", "#{class_name}ObserverTest"
+ m.class_collisions "#{class_name}Observer", "#{class_name}ObserverTest"
# Observer, and test directories.
m.directory File.join('app/models', class_path)
View
2 .../lib/rails_generator/generators/components/performance_test/performance_test_generator.rb
@@ -4,7 +4,7 @@ class PerformanceTestGenerator < Rails::Generator::NamedBase
def manifest
record do |m|
# Check for class naming collisions.
- m.class_collisions class_path, class_name, "#{class_name}Test"
+ m.class_collisions class_name, "#{class_name}Test"
# performance test directory
m.directory File.join('test/performance', class_path)
View
2 railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
@@ -10,7 +10,7 @@ def initialize(runtime_args, runtime_options = {})
def manifest
record do |m|
# Check for class naming collisions.
- m.class_collisions class_path, class_name
+ m.class_collisions class_name
m.directory "#{plugin_path}/lib"
m.directory "#{plugin_path}/tasks"
View
4 railties/lib/rails_generator/generators/components/resource/resource_generator.rb
@@ -30,8 +30,8 @@ def initialize(runtime_args, runtime_options = {})
def manifest
record do |m|
# Check for class naming collisions.
- m.class_collisions(controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}Helper")
- m.class_collisions(class_path, "#{class_name}")
+ m.class_collisions("#{controller_class_name}Controller", "#{controller_class_name}Helper")
+ m.class_collisions(class_name)
# Controller, helper, views, and test directories.
m.directory(File.join('app/models', class_path))
View
4 railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
@@ -36,8 +36,8 @@ def initialize(runtime_args, runtime_options = {})
def manifest
record do |m|
# Check for class naming collisions.
- m.class_collisions(controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}Helper")
- m.class_collisions(class_path, "#{class_name}")
+ m.class_collisions("#{controller_class_name}Controller", "#{controller_class_name}Helper")
+ m.class_collisions(class_name)
# Controller, helper, views, test and stylesheets directories.
m.directory(File.join('app/models', class_path))

0 comments on commit 09c1718

Please sign in to comment.