Query parameter support for Controller routes.

This change enables routes to consume query (aka search string)
parameters in routes. Query parameters are always optional, and
a hash of the parameters is always passed as the last argument to
route handlers (even when there are no query parameters in location
bar).

Allowed query parameters can be defined in the `defineRoutes`
method of a `Controller`. Example:

```javascript
// ...
defineRoutes: function () {
  // All routes will consume a `foo` parameter
  this.query('foo');
  this.show('bar', 'showBar', function () {
    // Only routes that match in the `bar` namespace consume a `baz` parameter
    this.query('baz');
  });
},
// ...
```

In the example above, if the following location is visited on the page:

`/bar/1?foo=1&baz=2&unrecognized=3`

The `showBar` route will be called with the following `arguments`:

```javascript
[1, { foo: 1, baz: 2 }]
```
Two of the regexps in this method. Essentially they began auto-capturing
search strings (which we started doing in this change). I am current
attempting to upgrade us to 1.1.2 before this change is merged.


On Tue, Jul 29, 2014 at 10:25 AM, Sean Knox <notifications@github.com>
wrote:

> In src/promenade/application.js:
>
> > @@ -331,7 +331,25 @@ define(['backbone', 'underscore', 'jquery', 'require', 'promenade/inflector'],
> >
> >          return controller;
> >        }, this);
> > -    }
> > +    },
> > +
> > +    // TODO: Remove this when we update to Backbone >= 1.1.0
> > +    _routeToRegExp: (function () {
>
> What changed in Backbone 1.1.0?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/dabohealth/promenade/pull/77/files#r15538254>.
>



-- 


Chris Joel
Sr. Front End Developer

(925) 271 - 0334
chris@dabohealth.com

Dabo Health, Inc.
49 Powell Street, 2nd Floor
San Francisco, CA 94102

www.dabohealth.com