mysql-binuuid-rails
mysql-binuuid-rails copied to clipboard
Move unpack to deserialize
We need to unpack the binary when AR reads it from the database. That is the purpose of the method deserialize. That way, the cast method does not need to guess in which context it is called. That makes your code more straightforward to reason about.