Nested routes allow to capture relationship in your routing.
Questions tagged [nested-routes]
462 questions
1
vote
1 answer
Nested routes - rails 5.2.4 - Undefined local variable or method
To register addresses for clients in my application I am using nested routes, however when clicking on the link to register a new address or to edit an existing address the system presents the error:
undefined local variable or method `address' for…

Jemison Santos
- 13
- 3
1
vote
1 answer
Dynamic Route not being loaded with nested routing
I don't think I'm fully understanding how I can make routing work when nested
I have it structured this way because I need changes in SideDrawer to affect the Article component
and I haven't found a way to pass props down from a parent component to…

Baby Coder
- 759
- 1
- 7
- 14
1
vote
2 answers
Rails: using nested named routes
routes.rb:
resources :jobs do
resources :activitylogs
end
rake routes:
...
POST /jobs/:job_id/activitylogs(.:format) {:controller=>"activitylogs", :action=>"create"}
new_job_activitylog GET …

willoller
- 7,106
- 1
- 35
- 63
1
vote
2 answers
Rails 3 - Nested Routes "NoMethodError" despite being listed in rake routes
Ok guys so I have a nested route like this:
resources :apps do
resources :forms
end
In my form index I have this block:
<% @forms.each do |form| %>
<%= form.app_id %>
<%= form.title %>
<%= link_to…
Vue

Msencenb
- 5,675
- 11
- 52
- 84
1
vote
2 answers
Rails 3 Nested Resource Variables
I have a few questions relating to a Transaction object that I'm creating.
Transaction belongs_to Loan and Loan has_many Transactions.
Therefore, I setup a nested route:
resources :loans do
resources :transactions
end
My question is: How do I…

Justin
- 1,956
- 3
- 23
- 34
1
vote
0 answers
How to deal with dynamic components and router outlet?
Let's consider component structure:
appComponent > router-outlet (A, B, C) > a, b, c (According to selected one), where:
A, B, C: Load dynamically a, b, c (dynamic component loaders)
a, b, c: Dynamic loaded components
The purpose of this excercise…

Neiro Torres
- 11
- 2
1
vote
1 answer
Vue inside the child component doesn't update the parent component
I am using for nested routing in my Vue application.
The child component has a link component, and when I click the link, it doesn't update the parent component, but only the child component.
Does anyone know how to fix…

bli07
- 673
- 1
- 5
- 16
1
vote
1 answer
Nested form and route helpers for self-joins?
can I transcribe the examples given at the Action View Form Helpers Guide (https://guides.rubyonrails.org/form_helpers.html#nested-forms) on Nested Forms to Nested Forms and the example given in the Routes Guide…

von spotz
- 875
- 7
- 17
1
vote
1 answer
Syntax for correct Routes path
So I have a component for displaying players which uses my displayPlayerObject function. The problem is it is I do not have the correct route for fetching in the function and for POST in my routes.rb. The model relationships have the players…

Jabba the Hutt
- 654
- 3
- 15
1
vote
1 answer
React Router with Nested Layouts
I am having some issues with react routes and not sure what is the appropriate way to accomplish what I am trying.
I read in react router v4 parents should render their children so I have something like this

xjinx
- 185
- 8
1
vote
1 answer
Child Routes won't reload on SSR React App
Every time I try to do a page reload on any of my child routes, the page doesn't refresh correctly. It only shows the HTML with no CSS or JavaScript.
I have looked at the react-router-config documentation, react-router ssr documentation and have…

Derf Mongrel
- 89
- 1
- 12
1
vote
2 answers
Alias name for nested resources rails routes
I have batch_class model, and under that articles, assignments resources are there. The routes.rb look like this.
resources :batch_classes do
member do
resources :articles, except: [:index]
resources :assignments
end
end
The problem…

Rajan Verma - Aarvy
- 1,969
- 18
- 20
1
vote
1 answer
How can I use resource routes with nested controllers (that have parent models)
I am creating Elequent models with the following structure:
Event->hasMany(Invite)
Invite->belongsTo(Event)
I am creating a controller with the following artisan command:
php artisan make:controller -mInvite -pEvent EventInvitesController…

kaan_a
- 3,503
- 1
- 28
- 52
1
vote
0 answers
Problem using a form with nested routes in rails 3
I have a database structure where my Articles have many People (through a join, but that is working fine)
What I would like to happen is that when people create an article they can at the same time create new people
Ie the path should be of the form…

Chris
- 1,054
- 2
- 12
- 24
1
vote
2 answers
Rails 5 nested routes
I've three models Project, Card and Task.
project has_many :cards
card has_many :tasks
I've defined the route for building cards like following:
resources :projects, except: [:new, :edit, :show] do
resources :cards do
resources :tasks
…

Emu
- 5,763
- 3
- 31
- 51