Module: AnkiRecord::Helpers::AnkiGuidHelper
- Defined in:
- lib/anki_record/helpers/anki_guid_helper.rb
Overview
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.
Class Method Summary collapse
-
.globally_unique_id ⇒ Object
Returns a random string of 10 characters sliced out of a random base64 string (RFC 3548).
Class Method Details
.globally_unique_id ⇒ Object
Returns a random string of 10 characters sliced out of a random base64 string (RFC 3548).
15 16 17 |
# File 'lib/anki_record/helpers/anki_guid_helper.rb', line 15 def self.globally_unique_id SecureRandom.base64(9).slice(1, 10) end |