aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-02-01 20:12:52 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-02-02 14:52:59 -0200
commit5d8191a263c7439219b56ed5396ceebed981af2d (patch)
tree12f88c549b8a24e74435cf853d19f0b6e2ef2990 /actionpack/lib/action_view
parent0f234261552dae68b66d3d0271ef39c343082c36 (diff)
downloadrails-5d8191a263c7439219b56ed5396ceebed981af2d.tar.gz
rails-5d8191a263c7439219b56ed5396ceebed981af2d.tar.bz2
rails-5d8191a263c7439219b56ed5396ceebed981af2d.zip
Remove default class to collection_check_boxes and
collection_radio_buttons [Carlos Antonio da Silva + Rafael Mendonça França]
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/form_options_helper.rb16
-rw-r--r--actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb2
-rw-r--r--actionpack/lib/action_view/helpers/tags/collection_radio_buttons.rb2
3 files changed, 10 insertions, 10 deletions
diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb
index c5a738d99f..bc03a1cf83 100644
--- a/actionpack/lib/action_view/helpers/form_options_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -550,11 +550,11 @@ module ActionView
#
# If <tt>@post.author_id</tt> is already <tt>1</tt>, this would return:
# <input id="post_author_id_1" name="post[author_id]" type="radio" value="1" checked="checked" />
- # <label class="collection_radio_buttons" for="post_author_id_1">D. Heinemeier Hansson</label>
+ # <label for="post_author_id_1">D. Heinemeier Hansson</label>
# <input id="post_author_id_2" name="post[author_id]" type="radio" value="2" />
- # <label class="collection_radio_buttons" for="post_author_id_2">D. Thomas</label>
+ # <label for="post_author_id_2">D. Thomas</label>
# <input id="post_author_id_3" name="post[author_id]" type="radio" value="3" />
- # <label class="collection_radio_buttons" for="post_author_id_3">M. Clark</label>
+ # <label for="post_author_id_3">M. Clark</label>
#
# It is also possible to customize the way the elements will be shown by
# giving a block to the method:
@@ -570,14 +570,14 @@ module ActionView
#
# The builder methods <tt>label</tt> and <tt>radio_button</tt> also accept
# extra html options:
- # collection_check_boxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b|
+ # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) do |b|
# b.label(:class => "radio_button") { b.radio_button(:class => "radio_button") }
# end
#
# There are also two special methods available: <tt>text</tt> and
# <tt>value</tt>, which are the current text and value methods for the
# item being rendered, respectively. You can use them like this:
- # collection_radio_buttons(:post, :author_ids, Author.all, :id, :name_with_initial) do |b|
+ # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) do |b|
# b.label(:"data-value" => b.value) { b.radio_button + b.text }
# end
def collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
@@ -612,11 +612,11 @@ module ActionView
#
# If <tt>@post.author_ids</tt> is already <tt>[1]</tt>, this would return:
# <input id="post_author_ids_1" name="post[author_ids][]" type="checkbox" value="1" checked="checked" />
- # <label class="collection_check_boxes" for="post_author_ids_1">D. Heinemeier Hansson</label>
+ # <label for="post_author_ids_1">D. Heinemeier Hansson</label>
# <input id="post_author_ids_2" name="post[author_ids][]" type="checkbox" value="2" />
- # <label class="collection_check_boxes" for="post_author_ids_2">D. Thomas</label>
+ # <label for="post_author_ids_2">D. Thomas</label>
# <input id="post_author_ids_3" name="post[author_ids][]" type="checkbox" value="3" />
- # <label class="collection_check_boxes" for="post_author_ids_3">M. Clark</label>
+ # <label for="post_author_ids_3">M. Clark</label>
# <input name="post[author_ids][]" type="hidden" value="" />
#
# It is also possible to customize the way the elements will be shown by
diff --git a/actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb b/actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
index 8f0f5c89fe..5f1e9ec026 100644
--- a/actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
+++ b/actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
@@ -21,7 +21,7 @@ module ActionView
if block_given?
yield builder
else
- builder.check_box + builder.label(:class => "collection_check_boxes")
+ builder.check_box + builder.label
end
end
diff --git a/actionpack/lib/action_view/helpers/tags/collection_radio_buttons.rb b/actionpack/lib/action_view/helpers/tags/collection_radio_buttons.rb
index d11f8632b9..8e7aeeed63 100644
--- a/actionpack/lib/action_view/helpers/tags/collection_radio_buttons.rb
+++ b/actionpack/lib/action_view/helpers/tags/collection_radio_buttons.rb
@@ -20,7 +20,7 @@ module ActionView
if block_given?
yield builder
else
- builder.radio_button + builder.label(:class => "collection_radio_buttons")
+ builder.radio_button + builder.label
end
end
end