From 0ce7ea65e1b9be853a007379a35d93135fbba2aa Mon Sep 17 00:00:00 2001 From: Cesar Carruitero Date: Sun, 21 Oct 2012 13:56:56 -0500 Subject: update AssetTagHelper documentation [ci skip] --- .../lib/action_view/helpers/asset_tag_helper.rb | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 4eac6514df..d6a2f36c8e 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -24,7 +24,7 @@ module ActionView # Returns an HTML script tag for each of the +sources+ provided. # # Sources may be paths to JavaScript files. Relative paths are assumed to be relative - # to public/javascripts, full paths are assumed to be relative to the document + # to assets/javascripts, full paths are assumed to be relative to the document # root. Relative paths are idiomatic, use absolute paths only when needed. # # When passing paths, the ".js" extension is optional. @@ -33,14 +33,14 @@ module ActionView # last argument. # # javascript_include_tag "xmlhr" - # # => + # # => # # javascript_include_tag "xmlhr.js" - # # => + # # => # # javascript_include_tag "common.javascript", "/elsewhere/cools" - # # => - # # + # # => + # # # # javascript_include_tag "http://www.example.com/xmlhr" # # => @@ -65,24 +65,24 @@ module ActionView # to "screen", so you must explicitely set it to "all" for the stylesheet(s) to # apply to all media types. # - # stylesheet_link_tag "style" # => - # + # stylesheet_link_tag "style" + # # => # - # stylesheet_link_tag "style.css" # => - # + # stylesheet_link_tag "style.css" + # # => # - # stylesheet_link_tag "http://www.example.com/style.css" # => - # + # stylesheet_link_tag "http://www.example.com/style.css" + # # => # - # stylesheet_link_tag "style", :media => "all" # => - # + # stylesheet_link_tag "style", :media => "all" + # # => # - # stylesheet_link_tag "style", :media => "print" # => - # + # stylesheet_link_tag "style", :media => "print" + # # => # - # stylesheet_link_tag "random.styles", "/css/stylish" # => - # - # + # stylesheet_link_tag "random.styles", "/css/stylish" + # # => + # # # def stylesheet_link_tag(*sources) options = sources.extract_options!.stringify_keys @@ -186,11 +186,11 @@ module ActionView # image_tag("icon.png", :size => "16x10", :alt => "Edit Entry") # # => Edit Entry # image_tag("/icons/icon.gif", :size => "16") - # # => Icon + # # => Icon # image_tag("/icons/icon.gif", :height => '32', :width => '32') - # # => Icon + # # => Icon # image_tag("/icons/icon.gif", :class => "menu_icon") - # # => Icon + # # => Icon def image_tag(source, options={}) options = options.symbolize_keys -- cgit v1.2.3 From 40b0cecea2f4d7ee2e6c1210e6b33d9cdb788ed9 Mon Sep 17 00:00:00 2001 From: Cesar Carruitero Date: Sun, 21 Oct 2012 14:17:40 -0500 Subject: fix error in AssertTagHelper documentation [ci skip] --- actionpack/lib/action_view/helpers/asset_tag_helper.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index d6a2f36c8e..31316fcdd9 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -40,7 +40,7 @@ module ActionView # # javascript_include_tag "common.javascript", "/elsewhere/cools" # # => - # # + # # # # javascript_include_tag "http://www.example.com/xmlhr" # # => @@ -82,7 +82,7 @@ module ActionView # # stylesheet_link_tag "random.styles", "/css/stylish" # # => - # # + # # # def stylesheet_link_tag(*sources) options = sources.extract_options!.stringify_keys @@ -186,11 +186,11 @@ module ActionView # image_tag("icon.png", :size => "16x10", :alt => "Edit Entry") # # => Edit Entry # image_tag("/icons/icon.gif", :size => "16") - # # => Icon + # # => Icon # image_tag("/icons/icon.gif", :height => '32', :width => '32') - # # => Icon + # # => Icon # image_tag("/icons/icon.gif", :class => "menu_icon") - # # => Icon + # # => Icon def image_tag(source, options={}) options = options.symbolize_keys -- cgit v1.2.3 From be4a4cd38ff2c2db0f6b69bb72fb3557bd5a6e21 Mon Sep 17 00:00:00 2001 From: AvnerCohen Date: Mon, 29 Oct 2012 13:10:53 +0200 Subject: Hash Syntax to 1.9 related changes --- actionpack/lib/action_view/base.rb | 2 +- .../lib/action_view/helpers/asset_tag_helper.rb | 34 ++-- .../lib/action_view/helpers/atom_feed_helper.rb | 12 +- .../lib/action_view/helpers/capture_helper.rb | 10 +- actionpack/lib/action_view/helpers/date_helper.rb | 188 ++++++++++----------- actionpack/lib/action_view/helpers/debug_helper.rb | 2 +- .../lib/action_view/helpers/form_options_helper.rb | 44 ++--- .../lib/action_view/helpers/form_tag_helper.rb | 108 ++++++------ .../lib/action_view/helpers/javascript_helper.rb | 8 +- .../lib/action_view/helpers/number_helper.rb | 112 ++++++------ .../lib/action_view/helpers/record_tag_helper.rb | 6 +- .../lib/action_view/helpers/rendering_helper.rb | 4 +- .../lib/action_view/helpers/sanitize_helper.rb | 2 +- actionpack/lib/action_view/helpers/tag_helper.rb | 14 +- actionpack/lib/action_view/helpers/text_helper.rb | 44 ++--- .../lib/action_view/helpers/translation_helper.rb | 2 +- actionpack/lib/action_view/helpers/url_helper.rb | 8 +- .../lib/action_view/renderer/partial_renderer.rb | 54 +++--- actionpack/lib/action_view/routing_url_for.rb | 14 +- .../action_view/vendor/html-scanner/html/node.rb | 24 +-- 20 files changed, 346 insertions(+), 346 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 3464ec523e..668515df59 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -55,7 +55,7 @@ module ActionView #:nodoc: # # You can pass local variables to sub templates by using a hash with the variable names as keys and the objects as values: # - # <%= render "shared/header", { :headline => "Welcome", :person => person } %> + # <%= render "shared/header", { headline: "Welcome", person: person } %> # # These can now be accessed in shared/header with: # diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 31316fcdd9..29a5ccedc1 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -74,10 +74,10 @@ module ActionView # stylesheet_link_tag "http://www.example.com/style.css" # # => # - # stylesheet_link_tag "style", :media => "all" + # stylesheet_link_tag "style", media: "all" # # => # - # stylesheet_link_tag "style", :media => "print" + # stylesheet_link_tag "style", media: "print" # # => # # stylesheet_link_tag "random.styles", "/css/stylish" @@ -111,13 +111,13 @@ module ActionView # # => # auto_discovery_link_tag(:atom) # # => - # auto_discovery_link_tag(:rss, {:action => "feed"}) + # auto_discovery_link_tag(:rss, {action: "feed"}) # # => - # auto_discovery_link_tag(:rss, {:action => "feed"}, {:title => "My RSS"}) + # auto_discovery_link_tag(:rss, {action: "feed"}, {title: "My RSS"}) # # => - # auto_discovery_link_tag(:rss, {:controller => "news", :action => "feed"}) + # auto_discovery_link_tag(:rss, {controller: "news", action: "feed"}) # # => - # auto_discovery_link_tag(:rss, "http://www.example.com/feed.rss", {:title => "Example RSS"}) + # auto_discovery_link_tag(:rss, "http://www.example.com/feed.rss", {title: "Example RSS"}) # # => def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {}) if !(type == :rss || type == :atom) && tag_options[:type].blank? @@ -157,7 +157,7 @@ module ActionView # will be used if you add the page to the home screen of an iPod Touch, iPhone, or iPad. # The following call would generate such a tag: # - # <%= 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' %> def favicon_link_tag(source='favicon.ico', options={}) tag('link', { :rel => 'shortcut icon', @@ -183,13 +183,13 @@ module ActionView # # => Icon # image_tag("icon.png") # # => Icon - # image_tag("icon.png", :size => "16x10", :alt => "Edit Entry") + # image_tag("icon.png", size: "16x10", alt: "Edit Entry") # # => Edit Entry - # image_tag("/icons/icon.gif", :size => "16") + # image_tag("/icons/icon.gif", size: "16") # # => Icon - # image_tag("/icons/icon.gif", :height => '32', :width => '32') + # image_tag("/icons/icon.gif", height: '32', width: '32') # # => Icon - # image_tag("/icons/icon.gif", :class => "menu_icon") + # image_tag("/icons/icon.gif", class: "menu_icon") # # => Icon def image_tag(source, options={}) options = options.symbolize_keys @@ -232,19 +232,19 @@ module ActionView # # =>