aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorBrandon Medenwald <brandon@simplymadeapps.com>2016-06-09 08:36:07 -0500
committerSean Griffin <sean@seantheprogrammer.com>2016-06-09 09:36:07 -0400
commitf12c42fff2e0719a95477e40c6be24baeee3b9bd (patch)
treea486385415e22bb765fcb09162d7a32d032487f4 /actionpack/lib
parent6990fd3e2a9d59fde83e9bd34697641c44cb1674 (diff)
downloadrails-f12c42fff2e0719a95477e40c6be24baeee3b9bd.tar.gz
rails-f12c42fff2e0719a95477e40c6be24baeee3b9bd.tar.bz2
rails-f12c42fff2e0719a95477e40c6be24baeee3b9bd.zip
render_to_string Regression Outside of Real Requests in Rails 5.0.0.rc1 (#25308)
* Restore the functionality of PR#14129, but do so with not nil to better indicate the purpose of the conditional * Add a test when render_to_string called on ActionController::Base.new()
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/abstract_controller/rendering.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb
index a6fb0dbe1d..4ba2c26949 100644
--- a/actionpack/lib/abstract_controller/rendering.rb
+++ b/actionpack/lib/abstract_controller/rendering.rb
@@ -122,7 +122,7 @@ module AbstractController
def _normalize_render(*args, &block)
options = _normalize_args(*args, &block)
#TODO: remove defined? when we restore AP <=> AV dependency
- if defined?(request) && request.variant.present?
+ if defined?(request) && !request.nil? && request.variant.present?
options[:variant] = request.variant
end
_normalize_options(options)