Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make it work with nested routes? #3

Open
meliborn opened this issue Feb 17, 2017 · 1 comment
Open

How to make it work with nested routes? #3

meliborn opened this issue Feb 17, 2017 · 1 comment

Comments

@meliborn
Copy link

I have nested routes\controller and use pagination addon. It added queryParams to route\controller with the same name(size). As I understood, in case of nesting it call all routes\controllers from child to parent. So each controller has the same queryParams. And I get the next error:
Error: Assertion Failed: You're not allowed to have more than one controller property map to the same query param key, but both companies:sizeandcompanies.company.accounts:sizemap tosize. You can fix this by mapping one of the controller properties to a different query param key via the asconfig option, e.g.size: { as: 'other-size' }`

@Azdaroth
Copy link
Member

Hi @meliborn

Hmm, I don't think it is possible at the moment, the properties' names for query params are hardcoded. Currently one way to solve it would be to just copy the current content of mixins for controller / route and provide custom names. A PR making these properties configurable would be more than welcome :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants