I apologise for the question but I am new in RoR.
Basically I have a hotel model which has_many rooms.
I created a manager controller for administration (im redirected to it
after sucessful login)
I also created the "index" and "managing" views in the manager's View.
My managers controller has for methods "index", showing all hotels and
"managing", for showing a specific hotel using `
The goal is to list all the hotels and in front of every hotel, have a
link that goes to the "managing.html.erb" view with the selected hotel
Inside it, among others, I would like it to have a menu with several
options, one of them being "Add Room".
I searched and I think im looking at nested resources.
However, since I dont have a manager model (only the controller and
views), it it possible for me to create a link from de managers/index to
the "/managers/managing.html.erb" which would be something like
":3000/managing/1", 1 being the hotel?
How about ":3000/managing/1/room/new"? or ":3000/managing/1/room/1"?
Also, what would the link_to in my managers/index.html.erb would look
(link_to "Click to Manage this hotel", ?? )
Thank you in advance, I appreciate any tips, is this the right way of
doing things? I'm kind of confused...