I'm not being redirect to the page I expect.

Hey everyone,

I'm new to ruby on rails and have run into something that does not
seem right. I installed the login_generator "gem install
login_generator". and got everything working just fine, but I found
one strange problem.

If I go to the address http://localhost:3000/cookbook/recipe I am
prompted for a password. I enter it and am logged in. However I am
sent to the page http://localhost:3000/cookbook/recipe/index ...and
you guessed it there is no index view so I get an error.

If I am already logged in and I go to the page http://localhost:3000/cookbook/recipe
I am redirected to http://localhost:3000/cookbook/recipe/list.

Is this the correct behavior?

In the login controller redirect_back_or_default is called. How
exactly does redirect_back_or_default work?