August 5, 2007 8:03pm
If you want to pass information to a Camping controller, all you have to do is define the class like this:class Index < R '/(\d+)'Now whatever was matched by the regex \d+ can be retrieved by the variable id. If you want to pass more than one variable, just chain them like this:
get(id)class Index < R '/(\d+)/(\w+)'Each of your regex groups will be passed as a variable.
get(id, action)
If you forget to add the arguments to the get method, you'll get an error like this: