Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Resource and scaffold generators pass on the full name to the depende…

…nt model, so nested resources give a corresponding nested model.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit ace7518fcb3d592f63d599f299699c653980c396 1 parent 473202d
@jeremy jeremy authored
View
2  railties/lib/rails_generator/generators/components/resource/resource_generator.rb
@@ -41,7 +41,7 @@ def manifest
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")
View
2  railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
@@ -54,7 +54,7 @@ def manifest
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")
Please sign in to comment.
Something went wrong with that request. Please try again.