Assume status 401 if action finishes without status code and no exception, closes #1316.

This commit is contained in:
José Valim 2011-09-29 12:28:32 +02:00
parent bc8fc2d4e4
commit 1e2dab3c0c
1 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,13 @@ module Devise
helper_method :warden, :signed_in?, :devise_controller?
end
module ClassMethods
def log_process_action(payload)
payload[:status] ||= 401 unless payload[:exception]
super
end
end
# Define authentication filters and accessor helpers based on mappings.
# These filters should be used inside the controllers as before_filters,
# so you can control the scope of the user who should be signed in to