aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
Commit message (Collapse)AuthorAgeFilesLines
* Move actionpack/lib/action_view* into actionview/libPiotr Sarnacki2013-06-201-43/+0
|
* mark ActionView::Helpers::Tags as :nodoc: [ci skip]Francesco Rodriguez2013-04-041-3/+3
|
* Capture block so content won't leak.José Mota2013-01-211-2/+2
| | | | | | | | | | | | | | The [following pull request](https://github.com/rails/rails/pull/8916) fixed the block being passed to the appropriate helper method. However, the content being passed into the block is generating repeated markup on the page due to some weird ERb evaluation. This commit tries to capture the block's generated output so the page isn't flooded with markup. [Rafael França + José Mota] Closes #8936
* Extract the component rendering of collection_radio_buttons andRafael Mendonça França2012-12-261-1/+7
| | | | | | | | | | | | | | | | | | | | | | collection_check_boxes to a private method. It will make easier to extend. Example: class CollectionRadioButtons < ActionView::Helpers::Tags::CollectionRadioButtons include CollectionExtensions def render wrap_rendered_collection(super, @options) end private def render_component(builder) builder.radio_button + builder.label(:class => "collection_radio_buttons") end end
* Support :multiple option on input tags with :indexDaniel Fox, Grant Hutchins & Trace Wax2012-11-021-1/+1
| | | | | When you have an explicit index set, then when you build an input tag with :multiple => true, it doesn't add [] to the end of its name, although it should.
* Allow collection helpers with block to access current object in the collectionCarlos Antonio da Silva2012-02-131-2/+2
| | | | | | | | | | This gives a lot more flexibility to the user, for instance to generate a collection of check boxes and labels, allowing to add custom classes or data-* attributes to the label/check_box using another object attribute. This basically mimics options_for_select functionality that accepts a third option for each item to generate html attributes for each option.
* Remove default class to collection_check_boxes andRafael Mendonça França2012-02-021-1/+1
| | | | | | collection_radio_buttons [Carlos Antonio da Silva + Rafael Mendonça França]
* Extract common collection helpers to a module to avoid too much inheritanceCarlos Antonio da Silva2012-02-021-1/+5
| | | | [Carlos Antonio da Silva + Rafael Mendonça França]
* Create a Builder factory class to use with collection helpers + blockCarlos Antonio da Silva2012-02-021-9/+10
| | | | | | | | This will make it easy for the user to handle how check box/radio and labels should be generated, abstracting any text/value/default html options required to make it work. [Carlos Antonio da Silva + Rafael Mendonça França]
* Refactor collection helpers to extract radio/checkbox/label callsCarlos Antonio da Silva2012-02-021-4/+8
| | | | [Carlos Antonio da Silva + Rafael Mendonça França]
* Remove collection_wrapper* and item_wrapper* optionsCarlos Antonio da Silva2012-02-021-1/+1
| | | | [Carlos Antonio da Silva + Rafael Mendonça França]
* Refactor the methods to use instance variablesRafael Mendonça França2012-02-021-6/+6
| | | | [Carlos Antonio da Silva + Rafael Mendonça França]
* Refactor render_collection methodRafael Mendonça França2012-02-021-3/+1
| | | | [Carlos Antonio da Silva + Rafael Mendonça França]
* Add collection_check_boxes helperCarlos Antonio da Silva2012-02-021-0/+30
[Carlos Antonio da Silva + Rafael Mendonça França]