The ActiveModel::Serializers gem can help you build JSON APIs through serializer objects. This provides a dedicated place to fully customize the JSON output.
(10 minutes)
There are a variety of ways to pass variables from a Rails application to JavaScript. Here I show three techniques: a script tag, a data attribute, and the Gon gem.
(6 minutes)
RABL - Ruby API Builder Language - provides a DSL for generating JSON or XML responses in a Ruby application. Learn how to share and configure complex JSON data in this episode.
(8 minutes)