Method: Valkyrie::Persistence::OptimisticLockToken.deserialize
- Defined in:
- lib/valkyrie/persistence/optimistic_lock_token.rb
.deserialize(serialized_token) ⇒ Object
Deserializing lock tokens means that we can then use the adapter id and the lock token value
27 28 29 30 31 32 |
# File 'lib/valkyrie/persistence/optimistic_lock_token.rb', line 27 def self.deserialize(serialized_token) token_parts = serialized_token.to_s.split(":", 3) adapter_id = token_parts[1] token = token_parts[2] new(adapter_id: Valkyrie::ID.new(adapter_id), token: token) end |