1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

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

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