I am learning ruby on rails and javascript. Is there anyway to load js file only when needed by the railsapp? I tried to create simple application but when I check on the log, I realize it always load all the js, even the unneeded library.
I already searched it and found that it is using configuration to load a specific js only for specific pages.It's good, but I guess when we deal with a library that is used by many pages,, will make it hard to maintain. Could anyone give a good advice?
thank you