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/helpers/tag_helper.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'actionpack/lib/action_view/helpers/tag_helper.rb') diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb index 3327c69d61..8c7524e795 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionpack/lib/action_view/helpers/tag_helper.rb @@ -50,16 +50,16 @@ module ActionView # tag("br", nil, true) # # =>
# - # tag("input", :type => 'text', :disabled => true) + # tag("input", type: 'text', disabled: true) # # => # - # tag("img", :src => "open & shut.png") + # tag("img", src: "open & shut.png") # # => # - # tag("img", {:src => "open & shut.png"}, false, false) + # tag("img", {src: "open & shut.png"}, false, false) # # => # - # tag("div", :data => {:name => 'Stephen', :city_state => %w(Chicago IL)}) + # tag("div", data: {name: 'Stephen', city_state: %w(Chicago IL)}) # # =>
def tag(name, options = nil, open = false, escape = true) "<#{name}#{tag_options(options, escape) if options}#{open ? ">" : " />"}".html_safe @@ -79,12 +79,12 @@ module ActionView # ==== Examples # content_tag(:p, "Hello world!") # # =>

Hello world!

- # content_tag(:div, content_tag(:p, "Hello world!"), :class => "strong") + # content_tag(:div, content_tag(:p, "Hello world!"), class: "strong") # # =>

Hello world!

- # content_tag("select", options, :multiple => true) + # content_tag("select", options, multiple: true) # # => # - # <%= content_tag :div, :class => "strong" do -%> + # <%= content_tag :div, class: "strong" do -%> # Hello world! # <% end -%> # # =>
Hello world!
-- cgit v1.2.3