-
Notifications
You must be signed in to change notification settings - Fork 540
Add ability to use scoped routes, and named routes #159
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
Conversation
|
Thanks. Could you please squash your commits (or equivalent) so the .idea folder isn't in the commit log. Also, please make sure all tests pass and the project has 100% coverage. This can be done with: |
Remove .idea folder Remove .idea folder
|
Build is running right now, but should be good to go. |
|
Please add some tests to show how this will be used. Make sure you show how related resources references will be serialized. There are many options on the rails scope method. How does this change work with them? It would be good to add some documentation to the readme to cover the usage of this. Why did you name the controller method Also, please squash your commits so the .idea directory addition and removal isn't in the change log. See http://stackoverflow.com/questions/5667884/how-to-squash-commits-in-git-after-they-have-been-pushed |
Will do. I dug into the Rails implementation of
There really wasn't much of a reason, other than I was using an id to scope my routes. I'll rethink this with the refactor. Seems like someone could use a dasherized scope, among other things, so
Pretty sure I already did that? The .idea commits aren't showing up in the commit history anymore as far as I can see. |
|
scoped route is nice, any update on this? |
|
@maxhungry Just life getting in the way of me fixing this PR. Feel free to fork and hack away if you want! Thanks for the reminder though. I'll try to set some time aside to get this going again. |
|
@thibaudgg @maxhungry @lgebhardt I'm going to have to punt on this. I am involved in way too many projects right now, and just looked at the code base and the master branch has diverged quite a bit since I last looked at this. Sorry everyone! I hope someone is brave enough to take over on it. |
I had the need to use scoped and named routes in my API:
This pull request allows for the path option to work.
For the scoping, just add:
To define your scope to your controller and you're good to go.