diff --git a/config/initializers/attack.rb b/config/initializers/attack.rb index a9bbb5f3..eefcadc1 100644 --- a/config/initializers/attack.rb +++ b/config/initializers/attack.rb @@ -12,7 +12,7 @@ Rack::Attack.throttled_responder = lambda do |req| if req.path.end_with?('.json') [503, {}, [PETS_THROTTLE_MESSAGE]] else - flash = req.flash + flash = req.env['action_dispatch.request.flash_hash'] flash[:warning] = PETS_THROTTLE_MESSAGE [302, {"Location" => "/"}, [PETS_THROTTLE_MESSAGE]] end