aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-11-17 19:08:53 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-11-17 19:08:53 +0000
commite9a4e4d88b6377ce1b6167149ea45767018dac65 (patch)
tree3a80165a49719382fff3cc4e32c64d1d6cfbda75 /actionpack
parent60e425af33ed1e3319f22d7e904cd9fced55c9f4 (diff)
downloadrails-e9a4e4d88b6377ce1b6167149ea45767018dac65.tar.gz
rails-e9a4e4d88b6377ce1b6167149ea45767018dac65.tar.bz2
rails-e9a4e4d88b6377ce1b6167149ea45767018dac65.zip
Inline a method used by render_partial. Closes #2881.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3073 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/partials.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb
index aaef0c4f3d..063ff5688d 100644
--- a/actionpack/lib/action_view/partials.rb
+++ b/actionpack/lib/action_view/partials.rb
@@ -117,15 +117,12 @@ module ActionView
end
def add_object_to_local_assigns!(partial_name, local_assigns, object)
- local_assigns[partial_name.intern] ||= unwrap_object(object) || controller.instance_variable_get("@#{partial_name}")
- end
-
- def unwrap_object(object)
- if object.is_a?(ActionView::Base::ObjectWrapper)
- object.value
- else
- object
- end
+ local_assigns[partial_name.intern] ||=
+ if object.is_a?(ActionView::Base::ObjectWrapper)
+ object.value
+ else
+ object
+ end || controller.instance_variable_get("@#{partial_name}")
end
end
end