Questions tagged [nested-routes]

Nested routes allow to capture relationship in your routing.

http://guides.rubyonrails.org/routing.html#nested-resources

462 questions
4
votes
1 answer

Rails, path_names and nested resources

My routes: resources :events, :path_names => { :new => "organize" } do resources :forums end With these routes, I'll get urls like /events/:event_id/forums/organize. I don't want the path_names to propagate to my nested routes... Do I have to…
Robin
  • 21,667
  • 10
  • 62
  • 85
4
votes
3 answers

Naming params of nested routes

resources :leagues do resources :schedule end This generates: leagues/:id leagues/:league_id/schedule/:id How can I keep the league ID from changing param names? So it'll be: leagues/:id leagues/:id/schedule/:schedule_id
Fred Fickleberry III
  • 2,439
  • 4
  • 34
  • 50
4
votes
2 answers

Can I handle multiple loaders for a single URL in Remix?

Currently I have a landing page with multiple sections, it is build with Remix.run. The sections are part of the same url, they are shown one next to each other vertically in the same page. My problem is that the page last some time to load because…
Andres Pino
  • 155
  • 3
  • 9
4
votes
3 answers

How to achieve n levels of nested dynamic routes in Vue.js?

I want to achieve n levels of dynamic nested routes in Vue.js, where n is unknown to me. for eg - abc.com/ctx-path/component/1/2/...../n where 1,2,...n are the levels How can I achieve this with Vue-router?
4
votes
1 answer

DRF - Nested Routers - Create/Update nested object on POST/PUT/PATCH

I'm currently starting a simple Task App and I'm using Django 2.0.7, DRF 3.8.2 and drf-nested-routes 0.90.2 I have these models : class Client(TimeStampedModel): """ This model describes a client for the railroader. It can be created by the…
4
votes
1 answer

React-router: How nested routes work?

I have a react application with react-router. I am trying to setup nested routes: "/" --> home page "/products" --> products list (child component of home page) "/products/new" --> new product: child component of products list What I tried to do so…
TheSoul
  • 4,906
  • 13
  • 44
  • 74
4
votes
1 answer

Rails 4 nested shallow routes: how to get parent id in child controller?

In my Rails 4 app, there are four models: class User < ActiveRecord::Base has_many :administrations has_many :calendars, through: :administrations end class Calendar < ActiveRecord::Base has_many :administrations has_many :users, through:…
4
votes
1 answer

How to remove the prefix generated in routes.rb for the params in the path

Currently in my routes I have: # USER RESOURCES resources :users do resources :repositories patch 'change_password' get 'account_setting' end Which generates this path for the account_setting action: user_account_setting GET …
Tucker
  • 659
  • 4
  • 16
4
votes
3 answers

nested resources in devise

I am new to rails and I would like some advice as on my routes and the proper routing logic. I am working on a very simple app where users can post lists. The user (devise model) has_many lists and the list belongs_to a user. My list table has a…
Michael Brooks
  • 489
  • 4
  • 15
4
votes
1 answer

Laravel Nested Route issue

I'm having problem with the Laravel 4, nested routing. I can display the create method form but can't store. Here is the code, I'll just come to the point. I have a base Resource Controller and another nested controller This is in my…
Kbir Mhrjn
  • 215
  • 4
  • 14
4
votes
2 answers

create comments for nested routes

I'm trying to make a blog which has users, posts and comments. Each user can have many posts and many comments similarly each post can have many comments. I have successfully made the user and post sections but am having difficulty creating comments…
Mandeep
  • 9,093
  • 2
  • 26
  • 36
4
votes
2 answers

rails simple form for nested routes

I am trying to build a simple_form_for in Rails 3.2 for @objects with a doubly nested route, e.g.: /users/1/projects/2/objects The form is: <%= simple_form_for @object, :url => user_project_objects_path(@user, @project), :html => { :class =>…
codervince
  • 316
  • 4
  • 15
3
votes
3 answers

Rails 3 - How to change the parameter :id in resources

In routes.rb, resources :projects gives the following routes /projects/ /projects/:id While using nested resources like resources :projects do resources :photos end it gives the following…
Jey Geethan
  • 2,235
  • 5
  • 33
  • 60
3
votes
1 answer

MVC3 Navigation and breadcrumb - Data driven

I have seen some posts about navigation and breadcrumbs but did not find the exaxt same problem. However if there is, please forgive and point me to it. Thank you. My case : Interests Profiles | | |_Interest…
3
votes
1 answer

How to hide parent component when routing to nested path v6 reactjs?

The Exhibitions element holds a table of 9 exhibitions. On click on an exhibition from the table I want to route to the page of the exhibition (Exhibit1), currently attempting to do so via nested routing. In the Exhibitions const I have
San X
  • 63
  • 7
1 2
3
30 31