plataformatec/devise — pull request #1438 by hinrik (2011-11-13 21:18:17+00:00)
Title: Allow specifying a resource_return_to for sign out

It was impossible to accomplish this by providing a
custom #after_sign_out_path_for in ApplicationController because the
session gets destroyed before it is called. Furthermore,
resource_return_to is now used by default if it exists, so users won't
have to provide a custom #after_sign_out_path_for in that case.

Note: I couldn't quite figure out how to add a test for this in test/integration/authenticatable_test.rb.