diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-01-27 01:03:56 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-01-27 01:03:56 +0000 |
commit | 5ac3a9bd0b4cfd6aa7ad585ae6dde206c2e32bb0 (patch) | |
tree | 3cce25bd47e885e9a780583e499969cdaa242bb1 /actionpack/lib/action_view/partials.rb | |
parent | 6e165b894051a23c2818cb8d21dd74de8d41c622 (diff) | |
download | rails-5ac3a9bd0b4cfd6aa7ad585ae6dde206c2e32bb0.tar.gz rails-5ac3a9bd0b4cfd6aa7ad585ae6dde206c2e32bb0.tar.bz2 rails-5ac3a9bd0b4cfd6aa7ad585ae6dde206c2e32bb0.zip |
Use File.join to construct partial path. Closes #10932 [patrick.t.joyce]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/partials.rb')
-rw-r--r-- | actionpack/lib/action_view/partials.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb index a1ba60d560..f0f51e5176 100644 --- a/actionpack/lib/action_view/partials.rb +++ b/actionpack/lib/action_view/partials.rb @@ -107,17 +107,18 @@ module ActionView case partial_path when String, Symbol, NilClass path, partial_name = partial_pieces(partial_path) + full_partial_path = File.join(path, "_#{partial_name}") object = extracting_object(partial_name, object_assigns) local_assigns = local_assigns ? local_assigns.clone : {} add_counter_to_local_assigns!(partial_name, local_assigns) add_object_to_local_assigns!(partial_name, local_assigns, object) if logger && logger.debug? - ActionController::Base.benchmark("Rendered #{path}/_#{partial_name}", Logger::DEBUG, false) do - render("#{path}/_#{partial_name}", local_assigns) + ActionController::Base.benchmark("Rendered #{full_partial_path}", Logger::DEBUG, false) do + render(full_partial_path, local_assigns) end else - render("#{path}/_#{partial_name}", local_assigns) + render(full_partial_path, local_assigns) end when ActionView::Helpers::FormBuilder builder_partial_path = partial_path.class.to_s.demodulize.underscore.sub(/_builder$/, '') |