aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/active_model_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Raise deprecation for calling `[:f] = 'b'` or `[:f] << 'b'`lulalala2019-03-311-5/+5
| | | | Revert some tests to ensure back compatibility
* Fix field_error_proc wrap form select optgroup and divider option tagneumayr2017-11-091-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | ### 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`
* Use frozen string literal in actionview/Kir Shatrov2017-07-241-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* class Foo < Struct.new(:x) creates an extra unneeded anonymous classAkira Matsuda2017-01-131-1/+1
| | | | because Struct.new returns a Class, we just can give it a name and use it directly without inheriting from it
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* modernizes hash syntax in actionviewXavier Noria2016-08-061-5/+5
|
* applies new string literal convention in actionview/testXavier Noria2016-08-061-3/+3
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* html_safe is not supposed to be public API for AV. This change removes usage ↵Vipul A M2016-01-201-1/+1
| | | | | | of html_safe in favour of raw() in AV helpers. Also changed usage of html_safe to make use of raw() instead so that the intended behaviour is verified with raw()
* Move template tests from actionpack to actionviewPiotr Sarnacki2013-06-201-0/+99