Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for ActionView::Template#refresh in rails 3.1.0.beta

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit c42ea2172eb977538cda076942d69eb90e090a26 1 parent 69789c3
André Camargo authored josevalim committed
View
2  actionpack/lib/action_view/template.rb
@@ -163,7 +163,7 @@ def refresh(view)
name = pieces.pop
partial = !!name.sub!(/^_/, "")
lookup.disable_cache do
- lookup.find_template(name, pieces.join, partial, @locals)
+ lookup.find_template(name, pieces.join('/'), partial, @locals)
end
end
View
4 actionpack/test/template/template_test.rb
@@ -93,9 +93,9 @@ def test_virtual_path
end
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]
- @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)
end
Please sign in to comment.
Something went wrong with that request. Please try again.