diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2005-07-14 01:12:21 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2005-07-14 01:12:21 +0000 |
commit | 19ee13867e8630233b59d57849aecc2a7e918c29 (patch) | |
tree | fad3f68f96336c50a8a6ec56efacd47bb5e9e456 /railties/lib/rails_generator/generators/components/controller | |
parent | fe0c7f4f76e8efce0d71fe705ce04e93bae74944 (diff) | |
download | rails-19ee13867e8630233b59d57849aecc2a7e918c29.tar.gz rails-19ee13867e8630233b59d57849aecc2a7e918c29.tar.bz2 rails-19ee13867e8630233b59d57849aecc2a7e918c29.zip |
Show correct paths to generated templates for nexted controllers. Fixes #730
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1828 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components/controller')
-rw-r--r-- | railties/lib/rails_generator/generators/components/controller/controller_generator.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/controller/templates/view.rhtml | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/railties/lib/rails_generator/generators/components/controller/controller_generator.rb b/railties/lib/rails_generator/generators/components/controller/controller_generator.rb index 32bc5c5842..358d357432 100644 --- a/railties/lib/rails_generator/generators/components/controller/controller_generator.rb +++ b/railties/lib/rails_generator/generators/components/controller/controller_generator.rb @@ -28,9 +28,10 @@ class ControllerGenerator < Rails::Generator::NamedBase # View template for each action. actions.each do |action| + path = File.join('app/views', class_path, file_name, "#{action}.rhtml") m.template 'view.rhtml', - File.join('app/views', class_path, file_name, "#{action}.rhtml"), - :assigns => { :action => action } + path, + :assigns => { :action => action, :path => path } end end end diff --git a/railties/lib/rails_generator/generators/components/controller/templates/view.rhtml b/railties/lib/rails_generator/generators/components/controller/templates/view.rhtml index 7e7a7d53ce..ad85431f98 100644 --- a/railties/lib/rails_generator/generators/components/controller/templates/view.rhtml +++ b/railties/lib/rails_generator/generators/components/controller/templates/view.rhtml @@ -1,2 +1,2 @@ <h1><%= class_name %>#<%= action %></h1> -<p>Find me in app/views/<%= file_name %>/<%= action %>.rhtml</p> +<p>Find me in <%= path %></p> |