aeolusproject/conductor — pull request #28 by n1zyy (2012-08-31 20:08:52+00:00)
Title: Bz 852531 login redirect

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=852531

This ended up being a really easy fix, though I set out trying to solve a challenging problem and thus spent forever walking through session code.

It seems like `redirect_back_or_default` is meant to redirect the user to redirect to `session[:return_to]`, or otherwise the default. But it was actually doing the opposite -- if you passed it a URL, it would redirect there. Otherwise, it would redirect back.

That has to be a bug, because if you wanted to override where it redirected you to (as we do when logging out), you should just redirect them normally.

I added a quick Cucumber test for this.