OgEx.Controller (og_ex v0.1.0)

Copy Markdown View Source

Adds OgEx support to the standard Phoenix controller render/3 call.

Use it after the application's normal controller setup:

use MyAppWeb, :controller
use OgEx.Controller

Summary

Functions

Installs an OgEx-aware local render/3 in the consuming controller.

Dispatches a controller render to either Phoenix HTML or an OgEx image.

Functions

__using__(options)

(macro)

Installs an OgEx-aware local render/3 in the consuming controller.

The generated function delegates to OgEx.Controller.render/3.

render(conn, template, options)

Dispatches a controller render to either Phoenix HTML or an OgEx image.

Without an :og option this delegates directly to Phoenix.Controller.render/3. With a card, it builds the deterministic card configuration and selects the response using the signed request parameter.