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

Configuration

All configuration files for Toast reside in config/toast-api/. They contain text in Ruby syntax. The file naming is arbitrary. Configurations can be placed into one file, or spread over multiple files. All *.rb files in config/toast-api are processed on application load.

Configurations files contain expose(Model) {...} stanzas, that declare how a model is to be exposed via the HTTP+JSON interface.

The expose stanzas can contain following model/resource specific configurations:

Global settings and defaults are configured in the global configuration file config/toast-api.rb.