Fix for ActionView::Template#refresh in rails 3.1.0.beta
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
69789c3b29
commit
c42ea2172e
|
@ -163,7 +163,7 @@ module ActionView
|
|||
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
|
||||
|
||||
|
|
|
@ -93,9 +93,9 @@ class TestERBTemplate < ActiveSupport::TestCase
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue