Rails Asset View Helpers
Each Rails view that ships with Workarea uses view helpers provided by Rails to link to assets and construct asset tags, such as script
tags that include JavaScript on the page.
The head and application script tags mentioned in the JavaScript overview are constructed in each Workarea layout by calling javascript_include_tag
. Out of the box, the method is called twice in each layout, once in the document head and once in the body, as shown in the example below.
workarea-storefront/app/views/layouts/workarea/storefront/application.html.haml:
%head
/...
= javascript_include_tag 'workarea/storefront/head'
/...
%body
/...
= javascript_include_tag 'workarea/storefront/application'
/...
Help Us Improve this Doc
Was this helpful? Open a GitHub issue to report a problem with this doc, suggest an improvement, or otherwise provide feedback. Thanks!