aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/render/partials.rb
diff options
context:
space:
mode:
authorGonçalo Silva <goncalossilva@gmail.com>2010-06-30 23:01:30 +0100
committerGonçalo Silva <goncalossilva@gmail.com>2010-06-30 23:01:30 +0100
commitd2c633ba0bfb7baacdee89a46d7d036d24c68817 (patch)
tree8f0974852b51597652e6ae73da26f3eb80fe878b /actionpack/lib/action_view/render/partials.rb
parent92c0f17d6d2a958d3a6285b0e5408e9e0e7122e1 (diff)
parentc63cf7bf0db708fe46a929cf57649ab5a92034af (diff)
downloadrails-d2c633ba0bfb7baacdee89a46d7d036d24c68817.tar.gz
rails-d2c633ba0bfb7baacdee89a46d7d036d24c68817.tar.bz2
rails-d2c633ba0bfb7baacdee89a46d7d036d24c68817.zip
Merge branch 'master' of http://github.com/rails/rails
Diffstat (limited to 'actionpack/lib/action_view/render/partials.rb')
-rw-r--r--actionpack/lib/action_view/render/partials.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb
index 85f67d4f14..459aae94a2 100644
--- a/actionpack/lib/action_view/render/partials.rb
+++ b/actionpack/lib/action_view/render/partials.rb
@@ -1,6 +1,8 @@
require 'active_support/core_ext/object/blank'
module ActionView
+ # = Action View Partials
+ #
# There's also a convenience method for rendering sub templates within the current controller that depends on a
# single object (we call this kind of sub templates for partials). It relies on the fact that partials should
# follow the naming convention of being prefixed with an underscore -- as to separate them from regular
@@ -316,7 +318,7 @@ module ActionView
object.class.model_name.partial_path.dup.tap do |partial|
path = @view.controller_path
- partial.insert(0, "#{File.dirname(path)}/") if path.include?(?/)
+ partial.insert(0, "#{File.dirname(path)}/") if partial.include?(?/) && path.include?(?/)
end
end
end