Class: ActionView::Helpers::AssetTagHelper::JavascriptIncludeTag

Inherits:
AssetIncludeTag show all
Defined in:
actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb

Constant Summary

Constants included from TagHelper

TagHelper::BOOLEAN_ATTRIBUTES

Instance Attribute Summary

Attributes inherited from AssetIncludeTag

#asset_paths, #config

Instance Method Summary collapse

Methods inherited from AssetIncludeTag

#include_tag, inherited, #initialize

Methods included from TagHelper

#cdata_section, #content_tag, #escape_once, #tag

Methods included from ActiveSupport::Concern

#append_features, extended, #included

Methods included from CaptureHelper

#capture, #content_for, #content_for?, #flush_output_buffer, #provide, #with_output_buffer

Constructor Details

This class inherits a constructor from ActionView::Helpers::AssetTagHelper::AssetIncludeTag

Instance Method Details

#asset_nameObject



10
11
12
# File 'actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb', line 10

def asset_name
  'javascript'
end

#asset_tag(source, options) ⇒ Object



18
19
20
# File 'actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb', line 18

def asset_tag(source, options)
  ("script", "", { "type" => Mime::JS, "src" => path_to_asset(source) }.merge(options))
end

#custom_dirObject



22
23
24
# File 'actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb', line 22

def custom_dir
  config.javascripts_dir
end

#extensionObject



14
15
16
# File 'actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb', line 14

def extension
  'js'
end