Skip to Content Skip to Search

A module for the method that computes the guid value of notes.

This guid is used by Anki when importing a deck package to update existing notes rather than create duplicates of them.

Methods
G

Class Public methods

globally_unique_id()

Returns a random string of 10 characters sliced out of a random base64 string (RFC 3548).

# File lib/anki_record/helpers/anki_guid_helper.rb, line 15
def self.globally_unique_id
  SecureRandom.base64(9).slice(1, 10)
end