I am struggling to add javascript files only needed in particular view at bottom of my layout. What I am doing right now is I am using my controller code to decide what javascript file this view should use. I don't want to write any view logic in controller as I think I should keep all front end logic outside of controller.
Any idea?