View on GitHub

Toast Manual

Toast is a Rack application that hooks into Ruby on Rails. It exposes ActiveRecord models as a web service (REST API).

Version 1.0.*

Table of Contents - Directives

Directive ‘expose’

expose({MODEL}, as: {MEDIA_TYPE}, under: {PATH}) {
  {DIRECTIVE}
  {DIRECTIVE}
  ...
}

The expose stanzas are the top level configuration elements. They declare what attributes and associations are exposed in the JSON representation of a model instance.

For each exposed model there should be one or more expose stanzas, with following arguments: