{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/25308","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/25308/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/25308/comments","events_url":"https://api.github.com/repos/rails/rails/issues/25308/events","html_url":"https://github.com/rails/rails/pull/25308","id":158783994,"number":25308,"title":"render_to_string Regression Outside of Real Requests in Rails 5.0.0.rc1","user":{"login":"bmedenwald","id":517871,"avatar_url":"https://avatars.githubusercontent.com/u/517871?v=3","gravatar_id":"","url":"https://api.github.com/users/bmedenwald","html_url":"https://github.com/bmedenwald","followers_url":"https://api.github.com/users/bmedenwald/followers","following_url":"https://api.github.com/users/bmedenwald/following{/other_user}","gists_url":"https://api.github.com/users/bmedenwald/gists{/gist_id}","starred_url":"https://api.github.com/users/bmedenwald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmedenwald/subscriptions","organizations_url":"https://api.github.com/users/bmedenwald/orgs","repos_url":"https://api.github.com/users/bmedenwald/repos","events_url":"https://api.github.com/users/bmedenwald/events{/privacy}","received_events_url":"https://api.github.com/users/bmedenwald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"schneems","id":59744,"avatar_url":"https://avatars.githubusercontent.com/u/59744?v=3","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-06-06T21:52:32Z","updated_at":"2016-06-07T00:03:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/25308","html_url":"https://github.com/rails/rails/pull/25308","diff_url":"https://github.com/rails/rails/pull/25308.diff","patch_url":"https://github.com/rails/rails/pull/25308.patch"},"body":"### Summary\r\n\r\nThis pull request addresses a regression in Rails 5 RC1..Beta when using render_to_string outside a real request. It restores the functionality of PR #14129, which fixed #14125 and was introduced in Rails 4.1.\r\n\r\nWhen doing:\r\n\r\n`ApplicationController.new.render_to_string( [...] )`\r\n\r\noutside of a request (in my case, a PDF render in ActiveJob), the `request` variable is defined but as `nil`. This was fixed in Rails 4.1, but the check was removed by @tenderlove  (e6425f6ecad2a1b771455f73ada9d15f72a687eb) to nuke what appeared like a useless conditional. \r\n\r\nThis change restores the nil check, but does so with `!request.nil?` so the purpose is easier understood to prevent future regressions."},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/224124984","html_url":"https://github.com/rails/rails/pull/25308#issuecomment-224124984","issue_url":"https://api.github.com/repos/rails/rails/issues/25308","id":224124984,"user":{"login":"matthewd","id":1034,"avatar_url":"https://avatars.githubusercontent.com/u/1034?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewd","html_url":"https://github.com/matthewd","followers_url":"https://api.github.com/users/matthewd/followers","following_url":"https://api.github.com/users/matthewd/following{/other_user}","gists_url":"https://api.github.com/users/matthewd/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewd/subscriptions","organizations_url":"https://api.github.com/users/matthewd/orgs","repos_url":"https://api.github.com/users/matthewd/repos","events_url":"https://api.github.com/users/matthewd/events{/privacy}","received_events_url":"https://api.github.com/users/matthewd/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T00:03:31Z","updated_at":"2016-06-07T00:03:31Z","body":"Thanks! Could you have a look to see if we can add a test to protect this use case too?"}}
{"actor":{"display_login":"matthewd"}}