aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/form_options_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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()
* Bring back `===` stubbing in `time_zone_select` test.Kasper Timm Hansen2015-11-221-1/+7
| | | | | | | Erroneously removed in 58910dc7. The stubbing was a regression test to ensure `time_zone_select` wasn't implemented with `grep`. Rename the test and add a comment to make the intent clearer.
* Ditch `each_with_index` for `each`.Kasper Timm Hansen2015-11-221-1/+1
| | | | We never touch the index, so don't bother.
* Don't cache fake time zones.Kasper Timm Hansen2015-11-221-8/+9
| | | | | | | | | When calling `test_time_zone_select_with_priority_zones_as_regexp` it would define `=~` on the fake zones, but it would never be cleaned up because of the zone cache. Nuke it so `test_time_zone_select_with_priority_zones_as_regexp_using_grep_finds_no_zones` accidentally find any zones because of `=~` being implemented.
* Removed Mocha from Action ViewRonak Jangir2015-09-231-13/+31
|
* Raise an ArgumentError when `include_blank` is false for a required field inGrey Baker2015-06-081-0/+7
| | | | | | | | | | `Tags::Base#select_content_tag`. Previously, passing a falsey value to `include_blank` would be ignored if the field was required, and a blank line would still be inserted. The following will now raise instead of quietly failing: `select("post", "category", %w(a required field), { include_blank: false }, required: 'required')`
* Fixed #select form builder helper to support block with html outputBogdan Gusiev2014-08-051-0/+13
|
* Add test for selected and disabled custom attributes in options_for_selectLaura Paredes2014-03-311-1/+21
|
* Fix some edge cases for AV `select` helper with `:selected` optionBogdan Gusiev2013-09-231-0/+16
|
* Ability to pass block to AV#select helperBogdan Gusiev2013-09-231-0/+15
| | | | | | | | Example: = select(report, "campaign_ids") do - available_campaigns.each do |c| %option{:data => {:tags => c.tags.to_json}, :value => c.id}= c.name
* There's no need to do thisSantiago Pastorino2013-09-171-4/+1
| | | | | | | AS does the following inside Time.find_zone! ... `ActiveSupport::TimeZone[time_zone] || TZInfo::Timezone.get(time_zone)` and given that the test is stubbing AS::TZ[] we don't need the removed code.
* add support for html attributes to grouped_options_for_selectVasiliy Ermolovich2013-07-201-0/+10
|
* Remove passing the prompt to grouped_options_for_select as an argument, ↵kennyj2013-06-281-17/+0
| | | | because it was deprecated.
* Move template tests from actionpack to actionviewPiotr Sarnacki2013-06-201-0/+1304