What the how the, where the..
<%= javascript_include_tag :defaults %>
this little evil line is pulling in 3 additional JavaScript that I could essentially give less then a damn about. In fact I would like to use that to redefine some defaults on a per page basis. However I can't seem to figure out where those defaults are defined.
Ive been on google and bing looking for answers but I yield none. I keep coming up with a document or 3 that explain using it, but not how I can use it.
Use the Rails API documentation for this.
If the application is not using the asset pipeline, to include the default JavaScript expansion pass
:defaults
as source. By default,:defaults
loads jQuery, and that can be overridden in config/application.rb:
config.action_view.javascript_expansions[:defaults] = %w(foo.js bar.js)
When using
:defaults
, if an application.js file exists in public/javascripts it will be included as well at the end.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With