Sha256: 76a5b1e9f6f378b6899924fb1e1bf405ad34510012be9d4a3b0307f30881d0bb
Contents?: true
Size: 827 Bytes
Versions: 18
Compression:
Stored size: 827 Bytes
Contents
# frozen_string_literal: true module Decidim class ErrorsController < Decidim::ApplicationController skip_before_action :verify_authenticity_token, :tos_accepted_by_user skip_after_action :verify_same_origin_request def not_found render status: :not_found end def internal_server_error @info_hash = { user: current_user&.id || t(".unknown"), date_and_time: l(Time.current, format: "%Y-%m-%dT%H:%M:%S.%6N"), request_method: request.request_method, url: try(:request).original_url, reference: Decidim::LogReferenceGenerator.new(request).generate_reference } @plain_info = @info_hash.keys.map { |val| t(".#{val}") }.zip(@info_hash.values).map { |val| val.join(": ") }.join("\n") render status: :internal_server_error end end end
Version data entries
18 entries across 18 versions & 1 rubygems