Skip to content

Commit

Permalink
Fix regression introduced in 8b50f89. Generated views mentioned the w…
Browse files Browse the repository at this point in the history
…rong path.
  • Loading branch information
jeremy committed Mar 21, 2010
1 parent b7adec3 commit 4941655
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ def copy_view_files
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
Expand Down
4 changes: 2 additions & 2 deletions railties/test/generators/controller_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def test_does_not_invoke_test_framework_if_required

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
Expand Down

0 comments on commit 4941655

Please sign in to comment.