mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
96d3f15222
commit
2713960dfc
4 changed files with 4 additions and 4 deletions
|
@ -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 @@ 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)
|
||||
|
|
Loading…
Reference in a new issue