Permalink
Browse files

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
  • Loading branch information...
1 parent fe0c7f4 commit 19ee13867e8630233b59d57849aecc2a7e918c29 @seckar seckar committed Jul 14, 2005
@@ -28,9 +28,10 @@ def manifest
# 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
@@ -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>
@@ -115,12 +115,12 @@ def manifest
# Unscaffolded views.
unscaffolded_actions.each do |action|
- m.template "controller:view.rhtml",
- File.join('app/views',
- controller_class_path,
- controller_file_name,
- "#{action}.rhtml"),
- :assigns => { :action => action }
+ path = File.join('app/views',
+ controller_class_path,
+ controller_file_name,
+ "#{action}.rhtml")
+ m.template "controller:view.rhtml", path,
+ :assigns => { :action => action, :path => path}
end
end
end

0 comments on commit 19ee138

Please sign in to comment.