Class Index [+]

Quicksearch

ActionView::Helpers::AssetTagHelper::JavascriptTagHelpers::ClassMethods

Public Instance Methods

register_javascript_expansion(expansions) click to toggle source

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>
    # File lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb, line 66
66:           def register_javascript_expansion(expansions)
67:             js_expansions = JavascriptIncludeTag.expansions
68:             expansions.each do |key, values|
69:               js_expansions[key] = (js_expansions[key] || []) | Array(values)
70:             end
71:           end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.