Fix regression introduced in 8b50f89
. Generated views mentioned the wrong path.
This commit is contained in:
parent
b7adec3563
commit
49416550fe
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue