Module: Kaui::UuidHelper
- Defined in:
- app/helpers/kaui/uuid_helper.rb
Instance Method Summary collapse
Instance Method Details
#truncate_uuid(uuid) ⇒ Object
4 5 6 7 8 |
# File 'app/helpers/kaui/uuid_helper.rb', line 4 def truncate_uuid(uuid) return uuid unless uuid =~ /[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}/ split = uuid.split('-') split[0] + '-...-' + split[4] end |