Fix regression introduced in 8b50f89. Generated views mentioned the wrong path.

This commit is contained in:
Jeremy Kemper 2010-03-21 16:05:35 -07:00
parent b7adec3563
commit 49416550fe
2 changed files with 5 additions and 4 deletions

View File

@ -10,8 +10,9 @@ module Erb
empty_directory base_path
actions.each do |action|
@action, @path = action, File.join(base_path, action)
template filename_with_extensions(:view), filename_with_extensions(@path)
@action = action
@path = filename_with_extensions(File.join(base_path, action))
template filename_with_extensions(:view), @path
end
end
end

View File

@ -49,8 +49,8 @@ class ControllerGeneratorTest < Rails::Generators::TestCase
def test_invokes_default_template_engine
run_generator
assert_file "app/views/account/foo.html.erb", /app\/views\/account\/foo/
assert_file "app/views/account/bar.html.erb", /app\/views\/account\/bar/
assert_file "app/views/account/foo.html.erb", %r(app/views/account/foo\.html\.erb)
assert_file "app/views/account/bar.html.erb", %r(app/views/account/bar\.html\.erb)
end
def test_add_routes