Skip to content

Commit

Permalink
fix broken format in ActionView::Helpers::AssetTagHelper [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Rodriguez committed Apr 4, 2013
1 parent 2a16e15 commit 4997831
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions actionpack/lib/action_view/helpers/asset_tag_helper.rb
Expand Up @@ -14,7 +14,6 @@ module Helpers #:nodoc:
# # => <img alt="Rails" src="/assets/rails.png" /> # # => <img alt="Rails" src="/assets/rails.png" />
# stylesheet_link_tag("application") # stylesheet_link_tag("application")
# # => <link href="/assets/application.css?body=1" media="screen" rel="stylesheet" /> # # => <link href="/assets/application.css?body=1" media="screen" rel="stylesheet" />
#
module AssetTagHelper module AssetTagHelper
extend ActiveSupport::Concern extend ActiveSupport::Concern


Expand Down Expand Up @@ -50,7 +49,6 @@ module AssetTagHelper
# #
# javascript_include_tag "http://www.example.com/xmlhr.js" # javascript_include_tag "http://www.example.com/xmlhr.js"
# # => <script src="http://www.example.com/xmlhr.js"></script> # # => <script src="http://www.example.com/xmlhr.js"></script>
#
def javascript_include_tag(*sources) def javascript_include_tag(*sources)
options = sources.extract_options!.stringify_keys options = sources.extract_options!.stringify_keys
path_options = options.extract!('protocol').symbolize_keys path_options = options.extract!('protocol').symbolize_keys
Expand Down Expand Up @@ -88,7 +86,6 @@ def javascript_include_tag(*sources)
# stylesheet_link_tag "random.styles", "/css/stylish" # stylesheet_link_tag "random.styles", "/css/stylish"
# # => <link href="/assets/random.styles" media="screen" rel="stylesheet" /> # # => <link href="/assets/random.styles" media="screen" rel="stylesheet" />
# # <link href="/css/stylish.css" media="screen" rel="stylesheet" /> # # <link href="/css/stylish.css" media="screen" rel="stylesheet" />
#
def stylesheet_link_tag(*sources) def stylesheet_link_tag(*sources)
options = sources.extract_options!.stringify_keys options = sources.extract_options!.stringify_keys
path_options = options.extract!('protocol').symbolize_keys path_options = options.extract!('protocol').symbolize_keys
Expand All @@ -109,10 +106,13 @@ def stylesheet_link_tag(*sources)
# +url_options+. You can modify the LINK tag itself in +tag_options+. # +url_options+. You can modify the LINK tag itself in +tag_options+.
# #
# ==== Options # ==== Options
#
# * <tt>:rel</tt> - Specify the relation of this link, defaults to "alternate" # * <tt>:rel</tt> - Specify the relation of this link, defaults to "alternate"
# * <tt>:type</tt> - Override the auto-generated mime type # * <tt>:type</tt> - Override the auto-generated mime type
# * <tt>:title</tt> - Specify the title of the link, defaults to the +type+ # * <tt>:title</tt> - Specify the title of the link, defaults to the +type+
# #
# ==== Examples
#
# auto_discovery_link_tag # auto_discovery_link_tag
# # => <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.currenthost.com/controller/action" /> # # => <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.currenthost.com/controller/action" />
# auto_discovery_link_tag(:atom) # auto_discovery_link_tag(:atom)
Expand Down Expand Up @@ -148,9 +148,12 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})
# you can override "rel" and "type". # you can override "rel" and "type".
# #
# ==== Options # ==== Options
#
# * <tt>:rel</tt> - Specify the relation of this link, defaults to 'shortcut icon' # * <tt>:rel</tt> - Specify the relation of this link, defaults to 'shortcut icon'
# * <tt>:type</tt> - Override the auto-generated mime type, defaults to 'image/vnd.microsoft.icon' # * <tt>:type</tt> - Override the auto-generated mime type, defaults to 'image/vnd.microsoft.icon'
# #
# ==== Examples
#
# favicon_link_tag '/myicon.ico' # favicon_link_tag '/myicon.ico'
# # => <link href="/assets/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" /> # # => <link href="/assets/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
# #
Expand All @@ -160,7 +163,6 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})
# #
# favicon_link_tag '/mb-icon.png', rel: 'apple-touch-icon', type: 'image/png' # favicon_link_tag '/mb-icon.png', rel: 'apple-touch-icon', type: 'image/png'
# # => <link href="/assets/mb-icon.png" rel="apple-touch-icon" type="image/png" /> # # => <link href="/assets/mb-icon.png" rel="apple-touch-icon" type="image/png" />
#
def favicon_link_tag(source='favicon.ico', options={}) def favicon_link_tag(source='favicon.ico', options={})
tag('link', { tag('link', {
:rel => 'shortcut icon', :rel => 'shortcut icon',
Expand All @@ -173,6 +175,7 @@ def favicon_link_tag(source='favicon.ico', options={})
# path or a file. # path or a file.
# #
# ==== Options # ==== Options
#
# You can add HTML attributes using the +options+. The +options+ supports # You can add HTML attributes using the +options+. The +options+ supports
# three additional keys for convenience and conformance: # three additional keys for convenience and conformance:
# #
Expand Down Expand Up @@ -250,6 +253,8 @@ def image_alt(src)
# width="30" and height="45". <tt>:size</tt> will be ignored if the # width="30" and height="45". <tt>:size</tt> will be ignored if the
# value is not in the correct format. # value is not in the correct format.
# #
# ==== Examples
#
# video_tag("trailer") # video_tag("trailer")
# # => <video src="/videos/trailer" /> # # => <video src="/videos/trailer" />
# video_tag("trailer.ogg") # video_tag("trailer.ogg")
Expand Down

0 comments on commit 4997831

Please sign in to comment.