Here’s how my Friday night is going:

def signin
if should_not_sign_user_in?(stuff)
return redirect_to :nope
# signin logic

The guard says I shouldn’t sign the user in. It logs the details of why. I read the logs; they’re all correct. It logs the return value, which is false, and the user gets signed in anyway.


There’s a return and a redirect there!

This is only happening on the QA server, too, so something fishy is going on.

  • 4
    Yes, yes, bad negatives.
    It’s pseudocode for simplicity’s sake. Deal!
  • 3
    There's nothing more fucking infuriating than trying to debug a page only for it to ZOOOM you off into redirect land.

    Wish browsers had a "ignore redirect" option in their network tools.
  • 0
    Debugging this must be extremely hard... idk Python lol
  • 1
    @OmerFlame this is ruby
  • 1
    @pxeger that looked like Python to me... oops
  • 1
    @AlgoRythm you can block a specific redirect request after it has been logged in the network tab
Add Comment