plataformatec/devise — pull request #2968 by laurocaetano (2014-04-08 19:02:01+00:00)
Title: Check if there is a logged user before logout.

Only execute the `SessionsController#destroy` if there is a logged in
user, otherwise it will raise `ActionController::InvalidAuthenticityToken`.

Fixes #2934.

cc @josevalim @lucasmazza