I am developing Rails 3.1 application, I get confused about where should I put my own javascript code(e.g. my.js) and where to put 3rd-party javascript library (e.g. jQuery-UI).
I know in the old version Rails, javascript should all goes into public/javascripts/ directory, when I generate Rails 3.1 app, there is no public/javascripts/ folder, but there is app/assets/ and verndor/assets/ and there is application.js in app/assets, I would like to ask:
- in Rails 3.1 ,where should I put my.js and jQuery-UI js in Rails 3.1??
- what is the app/assets/application.js supposed to do?
- how can I include my.js and jQuery-UI js in my html page?
----------------Am I right?----------
Is require_tree
in application.js is used to include 3rd-party libraries under app/vendor/assets/javascript/
and require "something"
in application.js is used to include js file under app/assets/javascripts/?? Am I right?