aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2012-02-14 01:28:22 -0800
committerJosé Valim <jose.valim@plataformatec.com.br>2012-02-14 01:28:22 -0800
commit65ffcec5a64053576b2597d3e40fd1d0176c7129 (patch)
tree3e5ed23429f8c403ea005cefaf5c66e569e8d691 /actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
parentc5b90a6ab1430107131f0cb363e2697a4ecb2714 (diff)
parenta10ed70999935cf86bd9a170ce3d4748631968ca (diff)
downloadrails-65ffcec5a64053576b2597d3e40fd1d0176c7129.tar.gz
rails-65ffcec5a64053576b2597d3e40fd1d0176c7129.tar.bz2
rails-65ffcec5a64053576b2597d3e40fd1d0176c7129.zip
Merge pull request #5032 from carlosantoniodasilva/collection-helpers-object
Allow collection helpers with block to access current object in the collection
Diffstat (limited to 'actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb')
-rw-r--r--actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb4
1 files changed, 2 insertions, 2 deletions
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 5f1e9ec026..e23f5113fb 100644
--- a/actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
+++ b/actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
@@ -14,9 +14,9 @@ module ActionView
end
def render
- rendered_collection = render_collection do |value, text, default_html_options|
+ rendered_collection = render_collection do |item, value, text, default_html_options|
default_html_options[:multiple] = true
- builder = instantiate_builder(CheckBoxBuilder, value, text, default_html_options)
+ builder = instantiate_builder(CheckBoxBuilder, item, value, text, default_html_options)
if block_given?
yield builder