diff options
author | neumayr <neumayr@users.noreply.github.com> | 2017-11-09 17:37:06 +0100 |
---|---|---|
committer | neumayr <neumayr@users.noreply.github.com> | 2017-11-09 17:37:06 +0100 |
commit | ead4776b82f838ee0630770d1852e8b02ac0f923 (patch) | |
tree | cc6416978ff0091d726d978d0b1fb8477108cd60 /actionpack/lib | |
parent | 0c2cb880e34c943275758ca6a6ff84afa7a29fba (diff) | |
download | rails-ead4776b82f838ee0630770d1852e8b02ac0f923.tar.gz rails-ead4776b82f838ee0630770d1852e8b02ac0f923.tar.bz2 rails-ead4776b82f838ee0630770d1852e8b02ac0f923.zip |
Fix field_error_proc wrap form select optgroup and divider option tag
### Summary
The [`:field_error_proc`](https://github.com/rails/rails/blob/master/actionview/lib/action_view/base.rb#L145) is responsible for decorating input tags that refer to attributes with errors. This default build-in rails feature wrap invalid form elements with additional markup: `<div class="field_with_errors">[…]</div>`.
* Fix for `field_error_proc` wraps form select `optgroup`
* Fix for `field_error_proc` wraps form select divider `option`
* Add tests for uncovered elements with errors
[Fixes #31088]
#### Test coverage
* `test_select_grouped_options_with_errors`
* `test_time_zone_select_with_priority_zones_and_errors`
#### Extend test coverage
* `test_collection_select_with_errors`
* `test_label_with_errors`
* `test_check_box_with_errors`
* `test_check_boxes_with_errors`
* `test_radio_button_with_errors`
* `test_radio_buttons_with_errors`
* `test_collection_check_boxes_with_errors`
* `test_collection_radio_buttons_with_errors`
Diffstat (limited to 'actionpack/lib')
0 files changed, 0 insertions, 0 deletions