Hi there.
I'm using Neo4J, which uses this gem for attribute declaration.
I'm also building a Rails app that uses UUIDs as primary keys in my Postgres database. I would like to be able to reference these primary keys, e.g. user_id, and have them be of the UUID type.
This could look something like:
class Node
include ActiveAttr::TypecastedAttributes
attribute :user_id, type: UUID
end
Currently, I'm using type: String, but that doesn't ensure that the given value is actually a UUID, and I have to write Active Model validators to ensure this, which is a bit of a pain.
Any pointers on where to start working on a PR is much appreciated. Thanks.
Hi there.
I'm using Neo4J, which uses this gem for attribute declaration.
I'm also building a Rails app that uses UUIDs as primary keys in my Postgres database. I would like to be able to reference these primary keys, e.g.
user_id, and have them be of the UUID type.This could look something like:
Currently, I'm using
type: String, but that doesn't ensure that the given value is actually a UUID, and I have to write Active Model validators to ensure this, which is a bit of a pain.Any pointers on where to start working on a PR is much appreciated. Thanks.