Skip to content

Commit

Permalink
Fix for ActionView::Template#refresh in rails 3.1.0.beta
Browse files Browse the repository at this point in the history
Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
André Camargo authored and josevalim committed Oct 15, 2010
1 parent 69789c3 commit c42ea21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/template.rb
Expand Up @@ -163,7 +163,7 @@ def refresh(view)
name = pieces.pop name = pieces.pop
partial = !!name.sub!(/^_/, "") partial = !!name.sub!(/^_/, "")
lookup.disable_cache do lookup.disable_cache do
lookup.find_template(name, pieces.join, partial, @locals) lookup.find_template(name, pieces.join('/'), partial, @locals)
end end
end end


Expand Down
4 changes: 2 additions & 2 deletions actionpack/test/template/template_test.rb
Expand Up @@ -93,9 +93,9 @@ def test_virtual_path
end end


def test_refresh_with_templates def test_refresh_with_templates
@template = new_template("Hello", :virtual_path => "test/foo") @template = new_template("Hello", :virtual_path => "test/foo/bar")
@template.locals = [:key] @template.locals = [:key]
@context.lookup_context.expects(:find_template).with("foo", "test", false, [:key]).returns("template") @context.lookup_context.expects(:find_template).with("bar", "test/foo", false, [:key]).returns("template")
assert_equal "template", @template.refresh(@context) assert_equal "template", @template.refresh(@context)
end end


Expand Down

0 comments on commit c42ea21

Please sign in to comment.