Aura Aura Rendering

Rendering

Allows rendering from multiple engines or renderers.

Usage

Registering

class Main < Sinatra::Base
  register Aura::Rendering

  # These two settings are optional.
  set :multi_views,   [ './views', './skin/default' ]
  set :multi_engines, [ :erb, :haml ]

Using show

Using #show will automatically find the appropriate template, trying the following variations.

  get '/' do
    show :home
  end
end

# ./views/home.erb
# ./views/home.haml
# ./skin/default/home.erb
# ./skin/default/home.haml