I am just getting started with ColdBox, trying to use a custom route
with an event handler. My config/routes.cfm looks like this:
<cfset addCourse(pattern="/people/:person_id", handler="users",
action="show")>
<cfset addCourse(":handler/:action?/:id?")>
(yes, making sure to put my custom route above the catch-all one)
I have a "handlers/users.cfc" with a "show" function.
So when I request a path such as "/index.cfm/people/23" I get this
error:
The event handler: people.23 is not valid registered event.
I would think that it would work just fine and the requestContext
object would allow me to access the "person_id" variable.
What am I missing?
I do have the proper interceptor enabled in coldspring.xml.cfm
<Interceptor class="coldbox.system.interceptors.ses">
<Property name="configFile">config/routes.cfm</Property>
</Interceptor>
Thanks in advance.