Represent Global IDs URIs: gid://basecamp/Todo/1234

(Moved from #16)

* Share Global IDs among collaborating apps and with non-Ruby/Rails code
* Well-known format with parsers & generators already implemented
* Pave the way to put verifier signature in the URI params, or e.g. a "?version=456" optimistic lock

Next steps:
* [ ] Beef up the URI parser
* [ ] Integrate signing into the URI as a query param
* [ ] Introduce an opaque, url-safe base64 #to_param
to_key needs to always return an array.
On Aug 13, 2014 7:17 PM, "Abdelkader Boudih" <notifications@github.com>
wrote:

> In lib/active_model/global_id.rb:
>
> >
> >  module ActiveModel
> >    autoload :GlobalLocator,  'active_model/global_locator'
> >    autoload :SignedGlobalID, 'active_model/signed_global_id'
> >
> >    class GlobalID
> > -    def self.create(model)
> > -      new "GlobalID-#{model.class.name}-#{model.id}"
> > +    class << self
> > +      attr_accessor :app
> > +
> > +      def create(model)
> > +        new URI("gid://#{GlobalID.app}/#{model.class.name}/#{model.id}")
>
> what about to_key ?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/rails/activemodel-globalid/pull/17/files#r16210248>.
>