- Create or find a gist that you own.
- Clone your gist (replace
<hash>with your gist's hash):# with ssh git clone [email protected]:<hash>.git mygist # with https
git clone https://gist.github.com/.git mygist
<hash> with your gist's hash):
# with ssh
git clone [email protected]:<hash>.git mygist
# with httpsgit clone https://gist.github.com/.git mygist
I started with simple, concrete hypermedia for Objectives. For the collection I created a collection method, into which I passed the Objectives to create a collection+json object. For a single record, I loop through its associations with reflect_on_all_associations, and create links to all its associated objects.
I then moved this logic to ApplicationController and abstracted it for use with Indicators.
Namespaces in this hackery were a little tricky: self_link could theoretically mean either:
{"rel": "self", "href": "/path/to/self"}