diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-11-03 01:56:16 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-11-03 01:56:16 +0530 |
commit | 3b0bb08699ce409b8213c82956dc34086dcbc8b9 (patch) | |
tree | 34398e3421fcfd86aab2b5fc757175dd2ce7664d /actionpack/lib/action_view/helpers/tag_helper.rb | |
parent | 974467d70d337d4c60414c792e275d367143217b (diff) | |
parent | ee917493e451e552fef18367f8bcba2f36080685 (diff) | |
download | rails-3b0bb08699ce409b8213c82956dc34086dcbc8b9.tar.gz rails-3b0bb08699ce409b8213c82956dc34086dcbc8b9.tar.bz2 rails-3b0bb08699ce409b8213c82956dc34086dcbc8b9.zip |
Merge branch 'master' of github.com:lifo/docrails
Conflicts:
actionpack/lib/action_controller/metal/mime_responds.rb
activerecord/lib/active_record/attribute_methods.rb
guides/source/working_with_javascript_in_rails.md
Diffstat (limited to 'actionpack/lib/action_view/helpers/tag_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/tag_helper.rb | 14 |
1 files changed, 7 insertions, 7 deletions
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) # # => <br> # - # tag("input", :type => 'text', :disabled => true) + # tag("input", type: 'text', disabled: true) # # => <input type="text" disabled="disabled" /> # - # tag("img", :src => "open & shut.png") + # tag("img", src: "open & shut.png") # # => <img src="open & shut.png" /> # - # tag("img", {:src => "open & shut.png"}, false, false) + # tag("img", {src: "open & shut.png"}, false, false) # # => <img src="open & shut.png" /> # - # tag("div", :data => {:name => 'Stephen', :city_state => %w(Chicago IL)}) + # tag("div", data: {name: 'Stephen', city_state: %w(Chicago IL)}) # # => <div data-name="Stephen" data-city-state="["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!") # # => <p>Hello world!</p> - # content_tag(:div, content_tag(:p, "Hello world!"), :class => "strong") + # content_tag(:div, content_tag(:p, "Hello world!"), class: "strong") # # => <div class="strong"><p>Hello world!</p></div> - # content_tag("select", options, :multiple => true) + # content_tag("select", options, multiple: true) # # => <select multiple="multiple">...options...</select> # - # <%= content_tag :div, :class => "strong" do -%> + # <%= content_tag :div, class: "strong" do -%> # Hello world! # <% end -%> # # => <div class="strong">Hello world!</div> |