I past and copy below the content of my application.js file.
The lines '//= require jquery' and '//= require jquery_ujs' should assure 
that the jquery and jquery-ujs files provided by jquery-rails gem will be 
added to the asset pipeline and available for use. "The require_tree 
directive tells Sprockets to recursively include *all* JavaScript files in 
the specified directory into the output. These paths must be specified 
relative to the manifest file".(quoted from guides.rubyonrails.org 
<http://guides.rubyonrails.org/asset_pipeline.html#manifest-files-and-directives>).
 
So the line '//= require_tree .' is telling Sprokets to include all files 
which are in the same directory of the manifest file ( . ), included my 
custom.js file.

// This is a manifest file that'll be compiled into application.js, which 
will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, 
lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced 
here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll 
appear at the bottom of the
// compiled file.
//
// Read Sprockets README 
(https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require turbolinks
//= require_tree .

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/9a3a782a-782c-4f75-a599-54c680b4a9e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to