Sha256: 76c5ae8d6230b2edbc25a9070eab122bf215c5badf2b3bdddb6ddaa4cfc64422
Contents?: true
Size: 673 Bytes
Versions: 130
Compression:
Stored size: 673 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim module PayloadInfo extend ActiveSupport::Concern included do def append_info_to_payload(payload) super payload[:user_id] = try(:current_user).try(:id) payload[:organization_id] = try(:current_organization).try(:id) payload[:app] = try(:current_organization).try(:name) payload[:remote_ip] = request.remote_ip payload[:referer] = request.referer.to_s payload[:request_id] = request.uuid payload[:user_agent] = request.user_agent payload[:xhr] = request.xhr? ? "true" : "false" end end end end
Version data entries
130 entries across 130 versions & 2 rubygems