Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Backout of blowup fix
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4945 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Sep 3, 2006
1 parent 268c1de commit 315603e
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions actionpack/lib/action_controller/base.rb
Expand Up @@ -671,21 +671,12 @@ def session_enabled?
def render(options = nil, deprecated_status = nil, &block) #:doc:
raise DoubleRenderError, "Can only render or redirect once per action" if performed?

if options.nil?
return render_file(default_template_name)
else
# Backwards compatibility
unless options.is_a?(Hash)
if options == :update
options = { :update => true }
else
ActiveSupport::Deprecation.warn(
"WARNING: You called render(#{options}), which is a deprecated API. Instead you use " +
"render :file => #{options}. Calling render with just a string will be removed from Rails 2.0."
)

return render_file(options || default_template_name, deprecated_status, true)
end
# Backwards compatibility
unless options.is_a?(Hash)
if options == :update
options = {:update => true}
else
return render_file(options || default_template_name, deprecated_status, true)
end
end

Expand Down

0 comments on commit 315603e

Please sign in to comment.