aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r--railties/lib/rails_generator/generators/components/resource/resource_generator.rb2
-rw-r--r--railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails_generator/generators/components/resource/resource_generator.rb b/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
index 669f4ff904..d5491ece36 100644
--- a/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
+++ b/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
@@ -41,7 +41,7 @@ class ResourceGenerator < Rails::Generator::NamedBase
m.directory(File.join('test/functional', controller_class_path))
m.directory(File.join('test/unit', class_path))
- m.dependency 'model', [singular_name] + @args, :collision => :skip
+ m.dependency 'model', [name] + @args, :collision => :skip
m.template(
'controller.rb', File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb")
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 d9ce668f2e..c9ce49a6fc 100644
--- a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
+++ b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
@@ -54,7 +54,7 @@ class ScaffoldGenerator < Rails::Generator::NamedBase
m.template('layout.html.erb', File.join('app/views/layouts', controller_class_path, "#{controller_file_name}.html.erb"))
m.template('style.css', 'public/stylesheets/scaffold.css')
- m.dependency 'model', [singular_name] + @args, :collision => :skip
+ m.dependency 'model', [name] + @args, :collision => :skip
m.template(
'controller.rb', File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb")