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 --- .../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 +- 16 files changed, 299 insertions(+), 299 deletions(-) (limited to 'actionpack/lib/action_view/helpers') 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 # # =>