| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
collection_radio_buttons
[Carlos Antonio da Silva + Rafael Mendonça França]
|
|
|
|
| |
[Carlos Antonio da Silva + Rafael Mendonça França]
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
| |
[Carlos Antonio da Silva + Rafael Mendonça França]
|
|
|
|
| |
[Carlos Antonio da Silva + Rafael Mendonça França]
|
|
|
|
|
|
|
|
|
|
| |
* Extract value sanitization from default name and id method and new
collection helpers;
* No need to sanitize value in default name and id always;
* Improve value_before_type_cast to avoid concating the same method name
string twice.
[Carlos Antonio da Silva + Rafael Mendonça França]
|
|
|
|
| |
[Carlos Antonio da Silva + Rafael Mendonça França]
|
|
|
|
| |
[Carlos Antonio da Silva + Rafael Mendonça França]
|
|
[Carlos Antonio da Silva + Rafael Mendonça França]
|