Flowdock
method

register_javascript_expansion

Importance_2
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ClassMethods

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

register_javascript_expansion(expansions) public

Register one or more javascript files to be included when symbol is passed to javascript_include_tag. This method is typically intended to be called from plugin initialization to register javascript files that the plugin installed in public/javascripts.

ActionView::Helpers::AssetTagHelper.register_javascript_expansion :monkey => ["head", "body", "tail"]

javascript_include_tag :monkey # =>
  <script type="text/javascript" src="/javascripts/head.js"></script>
  <script type="text/javascript" src="/javascripts/body.js"></script>
  <script type="text/javascript" src="/javascripts/tail.js"></script>
Show source
Register or log in to add new notes.