diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-03 22:46:16 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-03 22:46:16 +0000 |
commit | 315603e2be38042b7dd42cb460cd8d5cc66a0b2e (patch) | |
tree | 2762a756ed86991738f420eecfc1b16d5836253b /actionpack | |
parent | 268c1dee8f1297991f0836261e5fdde4c372945f (diff) | |
download | rails-315603e2be38042b7dd42cb460cd8d5cc66a0b2e.tar.gz rails-315603e2be38042b7dd42cb460cd8d5cc66a0b2e.tar.bz2 rails-315603e2be38042b7dd42cb460cd8d5cc66a0b2e.zip |
Backout of blowup fix
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4945 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 33bdeefe5c..1c04f5d583 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -671,21 +671,12 @@ module ActionController #:nodoc: 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 |