-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mathias Schreck
committed
Feb 7, 2014
1 parent
37e7ce6
commit 34e4338
Showing
1 changed file
with
0 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34e4338
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems to prevent syncer from passing query parameters to API server.
How can I pass the parameters from controller fetching?
My model and controller are like the following.
34e4338
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this fixed #198, where parameters where sent even when you didn't want them too. To revert back to the old behaviour, I think you'll need to provide a
url
function in your model like I described there.34e4338
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your quick reply. It works!
After modified...
34e4338
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above fix takes effect on the first page rendering. But on ajax, the parameter is duplicated like the following.
I think this will be fixed by #198, too. Do you have PR already, Chris?
34e4338
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, nothing yet
34e4338
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little bit disappointed to hear that... Thanks anyway :)
34e4338
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the initial complaint about #198 was a misunderstanding of how it works in rendr.
I believe it is intended behavior (and desired).
If you use the interpolatable URLs (with the
:key
syntax), then it won't append the unnecessary params.I think this change should be reverted. It was very useful not to have to mess with that in every url in models and collections.
34e4338
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
00_simple app can also reproduce the unnecessary params issue.
On server fetching,
"GET /repos/mojombo/grit HTTP/1.1 200"
On client fetching,
"GET /api/-/repos/mojombo/grit?owner=mojombo&name=grit HTTP/1.1 200"
"GET /api/travis-ci/-/repos/mojombo/grit?owner=mojombo&name=grit HTTP/1.1 200"
This issue was not occurred on 0.5.0-rc1.