Created
December 13, 2019 05:35
-
-
Save stephancom/b83f3c0ccae829690e01fe42ca2b92ee to your computer and use it in GitHub Desktop.
AuditDummy: handy for use in PaperTrail for a fake user that can have a GID
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ,ggg, | |
# dP""8I 8I I8 | |
# dP 88 stephan.com 8I I8 | |
# dP 88 presentsL 8I gg 88888888 | |
# ,8' 88 8I "" I8 | |
# ,gggggggggggg, d88888888 gg gg ,gggg,8I gg I8 | |
# dP"""88""""""Y8b, __ ,8" 88 I8 8I dP" "Y8I 88 I8 | |
# Yb, 88 `8b, dP" ,8P Y8 I8, ,8I i8' ,8I 88 ,I8, | |
# `" 88 `8b Yb,_,dP `8b,,d8b, ,d8b,,d8, ,d8b,_,88,_,d88b, | |
# 88 Y8 "Y8P" `Y88P'"Y88P"`Y8P"Y8888P"`Y88P""Y88P""Y8 | |
# 88 d8gg gg ,ggg,,ggg,,ggg, ,ggg,,ggg,,ggg, gg gg | |
# 88 ,8PI8 8I ,8" "8P" "8P" "8, ,8" "8P" "8P" "8, I8 8I | |
# 88 ,8P'I8, ,8I I8 8I 8I 8I I8 8I 8I 8I I8, ,8I | |
# 88______,dP',d8b, ,d8b,,dP 8I 8I Yb,,dP 8I 8I Yb,,d8b, ,d8I | |
# 888888888P" 8P'"Y88P"`Y88P' 8I 8I `Y88P' 8I 8I `Y8P""Y88P"888 | |
# ,d8I' | |
# This is a simple little shim for use with GlobalID, ,dP'8I | |
# so as to easily insert special identifiers into the ,8" 8I | |
# PaperTrail Whodunnit field. I8 8I | |
# `8, ,8I | |
# `Y8P" | |
class AuditDummy | |
include GlobalID::Identification | |
def self.find(id) | |
new(id) | |
end | |
def initialize(id) | |
@id = id | |
end | |
attr_reader :id | |
alias name id | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment