Skip to content
This repository
Browse code

Remove the class_path from the collisions test.

The class_path is often taken already in situations like Admin namespaces etc.
  • Loading branch information...
commit 09c1718198c58d2e14d267cbd771b4853b311da1 1 parent 3e9fc27
Michael Koziarski NZKoz authored
2  railties/lib/rails_generator/generators/components/controller/controller_generator.rb
@@ -2,7 +2,7 @@ class ControllerGenerator < Rails::Generator::NamedBase
2 2 def manifest
3 3 record do |m|
4 4 # Check for class naming collisions.
5   - m.class_collisions class_path, "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper"
  5 + m.class_collisions "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper"
6 6
7 7 # Controller, helper, views, and test directories.
8 8 m.directory File.join('app/controllers', class_path)
2  railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb
@@ -4,7 +4,7 @@ class IntegrationTestGenerator < Rails::Generator::NamedBase
4 4 def manifest
5 5 record do |m|
6 6 # Check for class naming collisions.
7   - m.class_collisions class_path, class_name, "#{class_name}Test"
  7 + m.class_collisions class_name, "#{class_name}Test"
8 8
9 9 # integration test directory
10 10 m.directory File.join('test/integration', class_path)
2  railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb
@@ -2,7 +2,7 @@ class MailerGenerator < Rails::Generator::NamedBase
2 2 def manifest
3 3 record do |m|
4 4 # Check for class naming collisions.
5   - m.class_collisions class_path, class_name, "#{class_name}Test"
  5 + m.class_collisions class_name, "#{class_name}Test"
6 6
7 7 # Mailer, view, test, and fixture directories.
8 8 m.directory File.join('app/models', class_path)
2  railties/lib/rails_generator/generators/components/model/model_generator.rb
@@ -4,7 +4,7 @@ class ModelGenerator < Rails::Generator::NamedBase
4 4 def manifest
5 5 record do |m|
6 6 # Check for class naming collisions.
7   - m.class_collisions class_path, class_name, "#{class_name}Test"
  7 + m.class_collisions class_name, "#{class_name}Test"
8 8
9 9 # Model, test, and fixture directories.
10 10 m.directory File.join('app/models', class_path)
2  railties/lib/rails_generator/generators/components/observer/observer_generator.rb
@@ -2,7 +2,7 @@ class ObserverGenerator < Rails::Generator::NamedBase
2 2 def manifest
3 3 record do |m|
4 4 # Check for class naming collisions.
5   - m.class_collisions class_path, "#{class_name}Observer", "#{class_name}ObserverTest"
  5 + m.class_collisions "#{class_name}Observer", "#{class_name}ObserverTest"
6 6
7 7 # Observer, and test directories.
8 8 m.directory File.join('app/models', class_path)
2  railties/lib/rails_generator/generators/components/performance_test/performance_test_generator.rb
@@ -4,7 +4,7 @@ class PerformanceTestGenerator < Rails::Generator::NamedBase
4 4 def manifest
5 5 record do |m|
6 6 # Check for class naming collisions.
7   - m.class_collisions class_path, class_name, "#{class_name}Test"
  7 + m.class_collisions class_name, "#{class_name}Test"
8 8
9 9 # performance test directory
10 10 m.directory File.join('test/performance', class_path)
2  railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
@@ -10,7 +10,7 @@ def initialize(runtime_args, runtime_options = {})
10 10 def manifest
11 11 record do |m|
12 12 # Check for class naming collisions.
13   - m.class_collisions class_path, class_name
  13 + m.class_collisions class_name
14 14
15 15 m.directory "#{plugin_path}/lib"
16 16 m.directory "#{plugin_path}/tasks"
4 railties/lib/rails_generator/generators/components/resource/resource_generator.rb
@@ -30,8 +30,8 @@ def initialize(runtime_args, runtime_options = {})
30 30 def manifest
31 31 record do |m|
32 32 # Check for class naming collisions.
33   - m.class_collisions(controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}Helper")
34   - m.class_collisions(class_path, "#{class_name}")
  33 + m.class_collisions("#{controller_class_name}Controller", "#{controller_class_name}Helper")
  34 + m.class_collisions(class_name)
35 35
36 36 # Controller, helper, views, and test directories.
37 37 m.directory(File.join('app/models', class_path))
4 railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
@@ -36,8 +36,8 @@ def initialize(runtime_args, runtime_options = {})
36 36 def manifest
37 37 record do |m|
38 38 # Check for class naming collisions.
39   - m.class_collisions(controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}Helper")
40   - m.class_collisions(class_path, "#{class_name}")
  39 + m.class_collisions("#{controller_class_name}Controller", "#{controller_class_name}Helper")
  40 + m.class_collisions(class_name)
41 41
42 42 # Controller, helper, views, test and stylesheets directories.
43 43 m.directory(File.join('app/models', class_path))

0 comments on commit 09c1718

Please sign in to comment.
Something went wrong with that request. Please try again.