liveh2o / active_remote

Active Remote provides Active Record-like object-relational mapping over RPC. It's Active Record for your platform.
MIT License
63 stars 23 forks source link

Add support for registering types #69

Closed liveh2o closed 5 years ago

liveh2o commented 5 years ago

In preparation for transitioning to Active Model 5.2, add support for registering types that can be used to define attributes without using the existing :type or :typecaster options:

attribute :name, :string

The :type and :typecaster options still work, but this brings the interface for the attribute method inline with what it is in Active Model 5.2.

Additionally, update the Protobuf serializer to use the new type registry rather than maintaining a map of typecasters directly.

newellista commented 5 years ago

LGTM :shipit: