Nested routes allow to capture relationship in your routing.
Questions tagged [nested-routes]
462 questions
8
votes
1 answer
drf-nested-routers RuntimeError('parent registered resource not found')
I am attempting to utilize the package drf-nested-routers to created nested routes within my API.
I've attempted to follow alongside the documentation (https://github.com/alanjds/drf-nested-routers) as well as read through multiple Stackoverflow…

Bonteq
- 777
- 7
- 24
8
votes
3 answers
Rails 3 link_to routes (edit) nested resources
Sorry if this has been asked elsewhere, but I can't figure this out. I have a forum with sections, topics, and replies. I'm trying to edit and delete replies from the show topic view. This is the structure:
resources :sections do
resources :topics…

a3uge
- 417
- 4
- 14
8
votes
1 answer
Rails 4 - how do I add an index route for a nested resource, in order to list all items independent of parent resource
I've got a nested resource Bar that belongs to Foo. I can successfully list all Bar objects that belong to any given Foo. But I also want to be able to generate a view with all Bar items listed together, from whatever Foo object they belong to.
The…

Scro
- 1,353
- 2
- 15
- 26
7
votes
1 answer
Rails routes.rb syntax
I have searched and searched and I cannot find a page which spells out the syntax of routes.rb in Rails 3. There are guidelines, overviews, even advanced examples but why isn't there a page that spells out the exact syntax of each keyword?? This…

pvenky
- 182
- 1
- 11
7
votes
1 answer
React Parent Component completely reconstructed when using Redirect
I am trying to utilize nested routes in order to maintain the appearance of a parent component on screen, and as the user navigates left and right in a tab structure, the content in that tabbed interface updates. I do not want the parent component…

cherries
- 113
- 1
- 8
7
votes
3 answers
Fonts not found with nested routes in react-router
I'm using React, React-Router and Webpack (with webpack-dev-server) and I'm having trouble loading custom fonts on nested routes.
Everything works fine on my shallow routes like /user, /group, etc., but when I have a nested route like /group/user,…

MindJuice
- 4,121
- 3
- 29
- 41
6
votes
1 answer
webpack historyApiFallback configuration for deep routes
webpack-dev-server can be set up to send you back to index.html and find your scripts for a single route like http://localhost:4301/sdr but when you put in a deeper route (or a single route with a / at the end) http://localhost:4301/sdr/dog it gets…

mcktimo
- 1,440
- 4
- 19
- 35
6
votes
1 answer
Rails 4 nested resources but not exposing the RESTful routes of parent?
I just started learning Ruby on Rails and working on a simple site that has the following setup:
resources :categories do
resources :products
end
resources :products do
resources :features
end
however I don't want to expose url to…

Stvyu
- 181
- 3
- 9
5
votes
1 answer
Zend: What is the most common way to create Rest Zend routes?
I'm using default Zend_Rest_Route to generate Rest routes:
So given I just put resources.router.routes.rest.type = Zend_Rest_Route inside application.ini and now have Rest Routes for users
GET users
POST users
GET users/:id
GET…

fantactuka
- 3,298
- 19
- 29
5
votes
2 answers
Angular 2 fetching url parameters with Child routes
Im just learning how to use Angular 2, and I am currently working with routes. What I'm trying to do is fetch a route parameter using child routes.
I'm currently working on an application that can display a users details. The url would look like…

Kaley36
- 233
- 9
- 19
5
votes
2 answers
Django REST Framework nested routes without PK
I want to implement routes like this:
/items - list of all items.
/items/types - list of all item types
I was looking at drf-nester-routs, but nested urls expect {pk} to be passed. Is there any good way to achieve what i want?

mcferden
- 316
- 3
- 11
5
votes
2 answers
Rails 5 - nested controllers with routes
I'm trying to make an app in Rails 5.
In order to keep the file structure neat, I'm trying to make folders inside my controllers directory, that I can use to group similar resources.
For example, I have:
app/controllers/users/users_controller.rb
I…

Mel
- 2,481
- 26
- 113
- 273
5
votes
1 answer
Sails.js group routes in v1, v2, etc
I have API with Sails.js and I want to wrap all my routes in v1. Is it possible?
Here is what I tried, but it doesn't work.
routes.js
'use strict';
module.exports.routes = {
'/v1': { //
'get /cron':…

Stan
- 25,744
- 53
- 164
- 242
5
votes
3 answers
Nested route in emberjs without using the resource outlet
I have a router with corresponding templates for each route (and route objects). I want to be able to display each template independently of its parent, meaning I don't want the nested routes to be rendered to the parent template's outlet.…

spullen
- 3,227
- 18
- 25
5
votes
2 answers
Rails: Custom nested controller actions
I want to setup a custom nested controller actions but I can't figure out the routing.
I keep getting the following error
No route matches [GET] "/assets"
routes.rb
resources :companies do
resources :requests do
match :accept
…

Aaron Dufall
- 1,177
- 10
- 34