In my layout application.html.erbfor my application, I want to have a partial one that displays if it exists for the given view. eg.
If the visitor is in http://example.com/users/show, I need a partial to /users/_sidebar.html.erbdisplay.
But if the visitor said, http://example.com/user/locations/san_franciscoI would like a partial to /users/locations/_sidebar.html.erbbe displayed.
So, the point here is that if there weren’t a partial for this controller / action, it would do some common parts in my shared directory, and I would prefer not to put each view using content_forblocks that you know?
Any ideas guys?
source
share