Download Plugin (zip)

Stats

Version

0.1.1

Wheels Compatibility

1.1.5, 1.1.4, 1.1.3, 1.1.2, 1.1.1, 1.1

Downloads

35

Last Updated

September 30, 2011

About Plugins

Plugins allow you to extend or modify default Wheels application behavior. To use, you just drop the zip file into your plugins directory and reload your application.

Read Using and Creating Plugins for more information.

ColdRoute

RESTful routing and namespaces with an elegant syntax.

Author

Don Humphreys

Project Home

https://github.com/dhumphreys/cfwheels-coldroute

Description

ColdRoute brings Rails 3 routing features to CFWheels. This includes namespaces, matching HTTP verbs, resources (RESTful routes), nested resources, and view helpers for routing.

Documentation can be found at: https://github.com/dhumphreys/cfwheels-coldroute

A Rails 3 routing screencast can be found at: http://railscasts.com/episodes/203-routing-in-rails-3

Usage/Examples

In routes.cfm:

<cfscript>
drawRoutes()
.resources(name="manufacturers", nested=true)
.resources(name="items")
.resource(name="logo", only="show,new,create,delete")
.end()
.resource(name="session", only="show,new,create,delete")
.wildcard()
.root(to="home##index")
.end();
</cfscript>

In your views:


#linkTo(text="Manufacturers", href=manufacturersPath())#
#linkTo(text="Delete Item", href=manufacturerItemPath(params.manufacturerKey, item.id), method="delete", confirm="Are you sure?")#
<form action="#manufacturerPath(manufacturer)#" method="post">
<input type="hidden" name="_method" value="put" />
...
</form>

Change Log

Version 0.1.1—September 30, 2011 Download

  • Fixed route helpers to allow strings params that appear to be boolean
  • Wheels compatibility: 1.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5.

Version 0.1—August 12, 2011 Download

  • Initial release.
  • Namespaces will not work with current versions of CFWheels (patch is pending).
  • Wheels compatibility: 1.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5.