Skip to content

Instantly share code, notes, and snippets.

@ichiban
Created January 8, 2017 06:38
Show Gist options
  • Save ichiban/a7334bea675be47f8e06b1dd74103448 to your computer and use it in GitHub Desktop.
Save ichiban/a7334bea675be47f8e06b1dd74103448 to your computer and use it in GitHub Desktop.
An easy way to implement HAL+JSON in Rails
# app/views/actors/show.json.jbuilder
json.(@actor, :name)
json.partial! 'partials/links', object: @actor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment