rails/rails — pull request #15766 by philnash (2014-06-17 07:48:11+00:00)
Title: Updates application layout template with JavaScript at bottom of page.

Prevailing wisdom in front end performance states that CSS should be
loaded at the top of a page and JavaScript at the bottom. This updates
the generated application layout to follow that convention.

The application layout will now look like this by default:

```erb

ApplicationName

<%= stylesheet_link_tag 'application', media: 'all',
'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>

<%= yield %>

<%= javascript_include_tag 'application',
'data-turbolinks-track' => true %>

```

This seems to me to be a more sensible default than the existing template as most people are likely to move the JavaScript tags from the head to the bottom of the body anyway. Please let me know what you think.