From f3fb416b89dab8d7b565b174bdc1116a519ab18d Mon Sep 17 00:00:00 2001 From: "Andrey A.I. Sitnik" Date: Thu, 5 Apr 2012 15:32:37 +0400 Subject: Remove unnecessary in HTML 5 type attribute with default value --- .../asset_tag_helpers/javascript_tag_helpers.rb | 56 +++++++++++----------- .../asset_tag_helpers/stylesheet_tag_helpers.rb | 44 ++++++++--------- 2 files changed, 50 insertions(+), 50 deletions(-) (limited to 'actionpack/lib/action_view/helpers/asset_tag_helpers') diff --git a/actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb b/actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb index c67f81dcf4..e3329c0345 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb @@ -16,7 +16,7 @@ module ActionView end def asset_tag(source, options) - content_tag("script", "", { "type" => Mime::JS, "src" => path_to_asset(source) }.merge(options)) + content_tag("script", "", { "src" => path_to_asset(source) }.merge(options)) end def custom_dir @@ -60,9 +60,9 @@ module ActionView # ActionView::Helpers::AssetTagHelper.register_javascript_expansion :monkey => ["head", "body", "tail"] # # javascript_include_tag :monkey # => - # - # - # + # + # + # def register_javascript_expansion(expansions) js_expansions = JavascriptIncludeTag.expansions expansions.each do |key, values| @@ -116,36 +116,36 @@ module ActionView # # ==== Examples # javascript_include_tag "xmlhr" - # # => + # # => # # javascript_include_tag "xmlhr.js" - # # => + # # => # # javascript_include_tag "common.javascript", "/elsewhere/cools" - # # => - # # + # # => + # # # # javascript_include_tag "http://www.example.com/xmlhr" - # # => + # # => # # javascript_include_tag "http://www.example.com/xmlhr.js" - # # => + # # => # # javascript_include_tag :defaults - # # => - # # - # # + # # => + # # + # # # # * = The application.js file is only referenced if it exists # # You can also include all JavaScripts in the +javascripts+ directory using :all as the source: # # javascript_include_tag :all - # # => - # # - # # - # # - # # + # # => + # # + # # + # # + # # # # Note that your defaults of choice will be included first, so they will be available to all subsequently # included files. @@ -166,25 +166,25 @@ module ActionView # # # assuming config.perform_caching is false # javascript_include_tag :all, :cache => true - # # => - # # - # # - # # - # # + # # => + # # + # # + # # + # # # # # assuming config.perform_caching is true # javascript_include_tag :all, :cache => true - # # => + # # => # # # assuming config.perform_caching is false # javascript_include_tag "jquery", "cart", "checkout", :cache => "shop" - # # => - # # - # # + # # => + # # + # # # # # assuming config.perform_caching is true # javascript_include_tag "jquery", "cart", "checkout", :cache => "shop" - # # => + # # => # # The :recursive option is also available for caching: # diff --git a/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb b/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb index 2584b67548..60d4af178a 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb @@ -17,7 +17,7 @@ module ActionView def asset_tag(source, options) # We force the :request protocol here to avoid a double-download bug in IE7 and IE8 - tag("link", { "rel" => "stylesheet", "type" => Mime::CSS, "media" => "screen", "href" => path_to_asset(source, :protocol => :request) }.merge(options)) + tag("link", { "rel" => "stylesheet", "media" => "screen", "href" => path_to_asset(source, :protocol => :request) }.merge(options)) end def custom_dir @@ -38,9 +38,9 @@ module ActionView # ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :monkey => ["head", "body", "tail"] # # stylesheet_link_tag :monkey # => - # - # - # + # + # + # def register_stylesheet_expansion(expansions) style_expansions = StylesheetIncludeTag.expansions expansions.each do |key, values| @@ -81,30 +81,30 @@ module ActionView # # ==== Examples # stylesheet_link_tag "style" # => - # + # # # stylesheet_link_tag "style.css" # => - # + # # # stylesheet_link_tag "http://www.example.com/style.css" # => - # + # # # stylesheet_link_tag "style", :media => "all" # => - # + # # # stylesheet_link_tag "style", :media => "print" # => - # + # # # stylesheet_link_tag "random.styles", "/css/stylish" # => - # - # + # + # # # You can also include all styles in the stylesheets directory using :all as the source: # # stylesheet_link_tag :all # => - # - # - # + # + # + # # # If you want Rails to search in all the subdirectories under stylesheets, you should explicitly set :recursive: # @@ -119,20 +119,20 @@ module ActionView # # ==== Examples # stylesheet_link_tag :all, :cache => true # when config.perform_caching is false => - # - # - # + # + # + # # # stylesheet_link_tag :all, :cache => true # when config.perform_caching is true => - # + # # # stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when config.perform_caching is false => - # - # - # + # + # + # # # stylesheet_link_tag "shop", "cart", "checkout", :cache => "payment" # when config.perform_caching is true => - # + # # # The :recursive option is also available for caching: # -- cgit v1.2.3