Nested resources and _path methods

Hi guys,

I was thinking aboiut this for a while:

If I have nested resource routes, for example /building/1/floor/2/room/
3 (building has_many floors and so on), I have to call the room_path
method like this:

room_path @room.floor.building, @room.floor, @room

Isn´t there a better way to handle nested routes with foreign keys, or
can I have this method overwritten somewhere?

Greets
Jonas

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs