Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Put your own javascript &amp; coffeescript under <code>app/assets/javascripts</code>.</p> <p>Take a look inside <code>app/assets/javascripts/application.js</code>. When you ran <code>rails new APP</code> it should have added <code>//= require_tree .</code> to this file. <a href="http://guides.rubyonrails.org/asset_pipeline.html">See section 2.3 for more</a>.</p> <p>This is a special instruction that <a href="http://jackdempsey.me/2011/04/22/rails-3-1-sprockets-and-coffeescript.html">Sprockets</a> understands that wil automatically include all files in the same directory as your <code>application.js</code> file and in subfolders below it.</p> <p>If you want jquery and jquery-ui to be loaded your application.js file should look like</p> <pre><code>//= require jquery //= require jquery-ui //= require jquery_ujs //= require_tree . </code></pre> <p>If you have <a href="https://github.com/rails/jquery-rails"><code>gem 'jquery-rails'</code></a> in your bundle, this gem has already added the jquery files to the asset pipeline for you, so you <strong>don't have to worry about downloading them manually</strong>.</p> <p>In your head section of your application view you will want to include <code>javascript_include_tag "application"</code> in the head section. Chances are, if you used the generator, it's already there.</p> <p>Please read up on the <a href="http://guides.rubyonrails.org/asset_pipeline.html">Rails Asset Pipeline</a> for more information.</p> <hr> <p>The <code>.</code> in the line with <code>require_tree</code> is referencing the location of the current file. The <code>//=</code> operator is referencing the asset pipeline.</p> <p>Placing a file in app/assets, lib/assets or vendor/assets will add it to the asset pipeline. <a href="http://guides.rubyonrails.org/asset_pipeline.html">See section 2.1</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload