Skip to content

Commit

Permalink
fewer direct env manipulations
Browse files Browse the repository at this point in the history
this commit removes some direct access to `env`.
  • Loading branch information
tenderlove committed Sep 15, 2015
1 parent ec6638a commit 49316d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -137,7 +137,7 @@ def initialize(controller)
def handle_unverified_request
request = @controller.request
request.session = NullSessionHash.new(request)
request.env['action_dispatch.request.flash_hash'] = nil
request.flash = nil

This comment has been minimized.

Copy link
@kwstannard

kwstannard Nov 30, 2021

Contributor

Cross linking for anyone else getting NoMethodError #flash on ActionDispatch::Request.

reactjs/react-rails#996 (comment)

request.env['rack.session.options'] = { skip: true }
request.cookie_jar = NullCookieJar.build(request, {})
end
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/http/request.rb
Expand Up @@ -324,7 +324,7 @@ def reset_session
else
self.session = {}
end
set_header('action_dispatch.request.flash_hash', nil)
self.flash = nil
end

def session=(session) #:nodoc:
Expand Down

0 comments on commit 49316d8

Please sign in to comment.