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 # # =>