method
redirect
v8.1.1 -
Show latest stable
- Class:
ActionDispatch::LogSubscriber
redirect(event)public
No documentation available.
# File actionpack/lib/action_dispatch/log_subscriber.rb, line 7
def redirect(event)
payload = event.payload
info { "Redirected to #{payload[:location]}" }
if ActionDispatch.verbose_redirect_logs
info { "â³ #{payload[:source_location]}" }
end
info do
status = payload[:status]
message = +"Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms"
message << "\n\n" if defined?(Rails.env) && Rails.env.development?
message
end
end