aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Camargo <andre@boaideia.inf.br>2010-10-15 00:11:40 -0300
committerJosé Valim <jose.valim@gmail.com>2010-10-15 08:39:10 +0200
commitc42ea2172eb977538cda076942d69eb90e090a26 (patch)
tree73e31f7b5f597bc9a2f022494b73b35ab1c414af
parent69789c3b29b9ee0b89928f4211060f470d0e0c44 (diff)
downloadrails-c42ea2172eb977538cda076942d69eb90e090a26.tar.gz
rails-c42ea2172eb977538cda076942d69eb90e090a26.tar.bz2
rails-c42ea2172eb977538cda076942d69eb90e090a26.zip
Fix for ActionView::Template#refresh in rails 3.1.0.beta
Signed-off-by: José Valim <jose.valim@gmail.com>
-rw-r--r--actionpack/lib/action_view/template.rb2
-rw-r--r--actionpack/test/template/template_test.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb
index 7dd8acf37b..dbb1532cd4 100644
--- a/actionpack/lib/action_view/template.rb
+++ b/actionpack/lib/action_view/template.rb
@@ -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
diff --git a/actionpack/test/template/template_test.rb b/actionpack/test/template/template_test.rb
index 63f792d328..2ec640c84c 100644
--- a/actionpack/test/template/template_test.rb
+++ b/actionpack/test/template/template_test.rb
@@ -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