mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Resource and scaffold generators pass on the full name to the dependent 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
This commit is contained in:
parent
473202df83
commit
ace7518fcb
2 changed files with 2 additions and 2 deletions
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue