I am refactoring my app since it is the first one and I have been doing the wrong things :)
I was also including page specific .js files in view depending on the libraries I needed and I have moved the bulk back to application.js as I noticed this was not the best practice.
Following the above approach I could either create a separate file for each controller action (i.e. one for index and one for edit for each controller).
Is this a good approach or would you recommend something else?