Sha256: 08dfc78c0ef205145108ac65608f145afae2af1a472d1522f1d7cc360ad0e515
Contents?: true
Size: 493 Bytes
Versions: 15
Compression:
Stored size: 493 Bytes
Contents
class Journaled::ActorUriProvider include Singleton def actor_uri actor_global_id_uri || fallback_global_id_uri end private def actor_global_id_uri actor = RequestStore.store[:journaled_actor_proc]&.call actor.to_global_id.to_s if actor end def fallback_global_id_uri if defined?(::Rails::Console) || File.basename($PROGRAM_NAME) == "rake" "gid://local/#{Etc.getlogin}" else "gid://#{Rails.application.config.global_id.app}" end end end
Version data entries
15 entries across 15 versions & 1 rubygems