Permalink
Browse files

render(:partial => "...") uses an empty hash for the local assigns #1365

. render(:partial => true) is identical to the older render_partial()

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1366 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
jamis committed May 30, 2005
1 parent b6c13f2 commit 00db6f0faae6d53b7190981561beb6da0450359b
View
@@ -1,5 +1,11 @@
*SVN*
+* render(:partial => true) is identical to the behavior of the deprecated render_partial()
+
+* Fixed render(:partial => "...") to use an empty Hash for the local assigns #1365
+
+* Fixed Caching::Fragments::FileStore.delete to not raise an exception if the delete fails.
+
* Deprecated all render_* methods in favor of consolidating all rendering behavior in Base#render(options). This enables more natural use of combining options, such as layouts. Examples:
+---------------------------------------------------------------+-------------------------------------------------------+
@@ -1574,4 +1580,4 @@
*0.7.5*
-* First public release
+* First public release
@@ -473,13 +473,18 @@ def render(options = {}, deprecated_status = nil)
render(options.merge({
:text => (
@template.render_partial_collection(
- options[:partial], options[:collection], options[:spacer_template], options[:locals]
+ options[:partial] == true ? default_template_name : options[:partial],
+ options[:collection], options[:spacer_template],
+ options[:locals] || {}
) || ''
)
}))
elsif options[:partial]
- render(options.merge({ :text => @template.render_partial(options[:partial], options[:object], options[:locals]) }))
+ render(options.merge({ :text => @template.render_partial(
+ options[:partial] == true ? default_template_name : options[:partial],
+ options[:object], options[:locals] || {}
+ ) }))
elsif options[:nothing]
render(options.merge({ :text => "" }))
@@ -72,7 +72,7 @@ def partials_list
end
def partial_only
- render_partial
+ render :partial => true
end
def hello_in_a_string
@@ -238,4 +238,4 @@ def test_accessing_params_in_template
def process_request
TestController.process(@request, @response)
end
-end
+end

0 comments on commit 00db6f0

Please sign in to comment.