You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "Locations" menu entry in the navbar could have submenus (in the "form" of the locations) to access the locations directly. Maybe cropped to .. 6? entries, a bit like this:
building1
|- floor1
|-- room 1
|-- server room
|-- rack1
|-- rack 2
|- floor2
building3
|- room X
building4
building5
building6
...(more) all locations
The quick and dirty solution would be to fetch the Locations from the view. The clean solution would be to subclass ApplicationController and get all the locations in a before_action (actually only if the reqest is not a XHR/json request, but we do not use these anyway) and then subclass all custom controllers from there. The reason would be that the DeviseController (login/forgot password etc) does not need to fetch the locations because it does not show the navbar.
The text was updated successfully, but these errors were encountered:
@fwolfst i got stuck on making a sub controller, the rest is pretty much done or easy to do.
@TheRealSyler Feel free to push something. Although maybe the subcontroller approach is somewhat more difficult than what we need. I'd happily explore the different paths with you. In any way, it should result in relatively few lines of code that can easily be moved araound.
The "Locations" menu entry in the navbar could have submenus (in the "form" of the locations) to access the locations directly. Maybe cropped to .. 6? entries, a bit like this:
The quick and dirty solution would be to fetch the Locations from the view. The clean solution would be to subclass ApplicationController and get all the locations in a
before_action
(actually only if the reqest is not a XHR/json request, but we do not use these anyway) and then subclass all custom controllers from there. The reason would be that the DeviseController (login/forgot password etc) does not need to fetch the locations because it does not show the navbar.The text was updated successfully, but these errors were encountered: