Method: Volt::ModelHelpers#generate_id
- Defined in:
- lib/volt/models/model_helpers/model_helpers.rb
#generate_id ⇒ Object
Create a random unique id that can be used as the mongo id as well
27 28 29 30 31 32 |
# File 'lib/volt/models/model_helpers/model_helpers.rb', line 27 def generate_id id = [] 24.times { id << ID_CHARS.sample } id.join end |