Allow specification of a namespace when calling urlFor with a DB Object #66

wants to merge 17 commits into


None yet

2 participants

GothAck commented Dec 12, 2012

urlFor(my_user, { namespace: 'admin' }) will result in adminUserURL helper

urlFor(my_user, { namespace: 'my/namespaces' }) will result in myNamespacesUserURL helper


@GothAck I'm currently looking at this patch, and considering merging it in.

In general, I like the fact that Express offers the ability to have RegExp-based routes. But, since Express routes are single level (no namespaces, no resource nesting, etc.), it's clear to reason about what the regex applies to. What's not clear, to me, is what happens when a RegExp is used in Locomotive on a resourceful or namespaced route. Match routes are clear, as long as they aren't nested.

What situations are you finding yourself needing this in? Moving this out of Namespace (and into match?) and some test coverage would ease my concerns. Holding off for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment