Skip to content

mehayden/ramazery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ramazery

This is a collection of prototypes, helpers and extensions for the excellent Ramaze web framework. The features here have been developed using the Ramaze 2011.01.30 gem.

Features

  1. Enhanced Tenjin Template Adapter
  2. Lambda Router for REST URL Patterns

Enhanced Tenjin Template Adapter

The currently shipped adapter for Tenjin does not support the features provided by the Tenjin::ContextHelper module including the use of nested templates.
This is because it uses the current action.binding and renders with code pulled from the Tenjin base.

The enhanced adapter uses a Tenjin::Engine hooked to a Tenjin::Context which is extended with the action instance variables and helpers. It uses the standard Tenjin render function which makes use of these objects.

Controller traits of :tenjin_options (Hash) and :tenjin_helpers (Array of Symbols) can be used to customize the behavior of the adapter. See Tenjin::Template #options and #extend_with_helpers for details.

Lambda Router for REST URL Patterns

The REST URL router accepts most of the URL patterns described at http://microformats.org/wiki/rest/urls. This includes the both the native HTTP methods (PUT, DELETE) and the simulated methods using the URL “_method” parameter. The router output is of the form:

<RestPrefix>/<Collection>/<Action>
	Or
<RestPrefix>/<Collection>/<Action>/<Id>

See “controller/init.rb” and “controller/test_rest_urls.rb” to see a test example for usage. A spec is provided to test the patterns. Currently the “follow a relationship” patterns are not supported.

About

Application protoypes and patches for Ramaze

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages