def sign_out(resource_or_scope)
      scope = Devise::Mapping.find_scope!(resource_or_scope)
      warden.user(scope) # Without loading user here, before_logout hook is not called
      warden.raw_session.inspect # Without this inspect here. The session does not clear.
      warden.logout(scope)
      # user id   
      post_signout scope            
    end
def sign_out(resource_or_scope)
      scope = Devise::Mapping.find_scope!(resource_or_scope)
      warden.user(scope) # Without loading user here, before_logout hook is not called
      warden.raw_session.inspect # Without this inspect here. The session does not clear.
      warden.logout(scope)
      # user id   
      post_signout scope            
    end
Sign out a given user or scope. This helper is useful for signing out an user
 after deleting accounts.

 Examples:

   sign_out :user     # sign_out(scope)
   sign_out @user     # sign_out(resource)