1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

13 commits

Author SHA1 Message Date
Kasper Timm Hansen
4547e894e9 Bring back === stubbing in time_zone_select test.
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.
2015-11-22 16:15:46 +01:00
Kasper Timm Hansen
3936f38dae Ditch each_with_index for each.
We never touch the index, so don't bother.
2015-11-22 16:14:37 +01:00
Kasper Timm Hansen
2a8ce91de9 Don't cache fake time zones.
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.
2015-11-22 16:11:28 +01:00
Ronak Jangir
a2a5191330 Removed Mocha from Action View 2015-09-23 23:34:04 +05:30
Grey Baker
0775407384 Raise an ArgumentError when include_blank is false for a required field in
`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')`
2015-06-08 16:41:44 +01:00
Bogdan Gusiev
7a0c2ba48b Fixed #select form builder helper to support block with html output 2014-08-05 17:23:00 +03:00
Laura Paredes
95692c6179 Add test for selected and disabled custom attributes in options_for_select 2014-03-31 20:51:13 +02:00
Bogdan Gusiev
e8e08d69c2 Fix some edge cases for AV select helper with :selected option 2013-09-23 17:48:23 +03:00
Bogdan Gusiev
57bf92c6de Ability to pass block to AV#select helper
Example:

    = select(report, "campaign_ids") do
      - available_campaigns.each do |c|
        %option{:data => {:tags => c.tags.to_json}, :value => c.id}= c.name
2013-09-23 14:25:42 +03:00
Santiago Pastorino
949c4291a4 There's no need to do this
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.
2013-09-17 16:12:15 -03:00
Vasiliy Ermolovich
cadfe4bf45 add support for html attributes to grouped_options_for_select 2013-07-20 17:14:28 +03:00
kennyj
94c72c45bb Remove passing the prompt to grouped_options_for_select as an argument, because it was deprecated. 2013-06-28 03:11:00 +09:00
Piotr Sarnacki
eb23754ebb Move template tests from actionpack to actionview 2013-06-20 17:23:16 +02:00
Renamed from actionpack/test/template/form_options_helper_test.rb (Browse further)