- 28 12月, 2017 1 次提交
-
-
由 Jérémie Bonal 提交于
Replaced the uses of `group.send(...)` in `option_groups_from_collection_for_select` by calls to `value_for_collection(group, ...)`, allowing the use of procs, lambdas and other callable objects as parameters.
-
- 10 11月, 2017 1 次提交
-
-
由 neumayr 提交于
### 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`
-
- 16 8月, 2017 1 次提交
-
-
由 Koichi ITO 提交于
And enable `context_dependent` of Style/BracesAroundHashParameters cop.
-
- 24 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 17 7月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
We have some indentation cops. But now there is a little inconsistent params indentations. Enable `Layout/FirstParameterIndentation` cop to prevent newly inconsistent indentation added and auto-correct to existing violations.
-
- 02 7月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
This reverts commit 3420a145, reversing changes made to afb66a5a.
-
- 01 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 17 5月, 2017 1 次提交
-
-
由 Sam Pohlenz 提交于
Allows a custom object implementing Enumerable to be used as the choices parameter for a select tag, which previously wasn't possible due to the call to `empty?` on the choices (which isn't implemented on Enumerable).
-
- 12 1月, 2017 1 次提交
-
-
由 Akira Matsuda 提交于
(I personally prefer writing one string in one line no matter how long it is, though)
-
- 29 10月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 16 8月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
-
- 07 8月, 2016 6 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 29 6月, 2016 1 次提交
-
-
由 Vipul A M 提交于
- Renamed test to be more descriptive
-
- 19 5月, 2016 1 次提交
-
-
由 Jeremy Daer 提交于
Ruby 2.4 unifies Fixnum and Bignum into Integer: https://bugs.ruby-lang.org/issues/12005 * Forward compat with new unified Integer class in Ruby 2.4+. * Backward compat with separate Fixnum/Bignum in Ruby 2.2 & 2.3. * Drops needless Fixnum distinction in docs, preferring Integer.
-
- 20 1月, 2016 1 次提交
-
-
由 Vipul A M 提交于
html_safe is not supposed to be public API for AV. This change removes usage 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()
-
- 22 11月, 2015 3 次提交
-
-
由 Kasper Timm Hansen 提交于
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.
-
由 Kasper Timm Hansen 提交于
We never touch the index, so don't bother.
-
由 Kasper Timm Hansen 提交于
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.
-
- 24 9月, 2015 1 次提交
-
-
由 Ronak Jangir 提交于
-
- 08 6月, 2015 1 次提交
-
-
由 Grey Baker 提交于
`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')`
-
- 05 8月, 2014 1 次提交
-
-
由 Bogdan Gusiev 提交于
-
- 01 4月, 2014 1 次提交
-
-
由 Laura Paredes 提交于
-
- 23 9月, 2013 2 次提交
-
-
由 Bogdan Gusiev 提交于
-
由 Bogdan Gusiev 提交于
Example: = select(report, "campaign_ids") do - available_campaigns.each do |c| %option{:data => {:tags => c.tags.to_json}, :value => c.id}= c.name
-
- 18 9月, 2013 1 次提交
-
-
由 Santiago Pastorino 提交于
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.
-
- 20 7月, 2013 1 次提交
-
-
由 Vasiliy Ermolovich 提交于
-
- 28 6月, 2013 1 次提交
-
-
由 kennyj 提交于
-
- 20 6月, 2013 1 次提交
-
-
由 Piotr Sarnacki 提交于
-
- 11 4月, 2013 1 次提交
-
-
由 Vasiliy Ermolovich 提交于
as the last element of the array
-
- 05 4月, 2013 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
- 03 4月, 2013 1 次提交
-
-
由 Vipul A M 提交于
-
- 28 3月, 2013 2 次提交
-
-
由 Brian McManus 提交于
Added a regression test that will fail if anyone tries to change time_zone_select to use grep again thinking it will work when it does not.
-
由 Brian McManus 提交于
A previous commit swapped out a call to select for a call to grep in time_zone_options_for_select. This behavior actually causes the regexp priority option to stop working. ActiveSupport::TimeZone overrides the =~ operator which is what the select block was using previously. Enumerable#grep checks pattern === element and in this case that would be /US/ === ActiveSupport::TimeZone which does not work because ActiveSupport::TimeZone does not supply an implicit converting to_str method, only an explicit to_s method. It would be impossible to provide a to_str method that behaves identically to the =~ method provided on ActiveSupport::TimeZone so the only option is to revert back to using select with =~.
-
- 09 3月, 2013 1 次提交
-
-
由 Olek Janiszewski 提交于
If an explicit name has been given and it already ends with "[]" Before: select(:category, [], {}, multiple: true, name: "post[category][]") # => <select name="post[category][][]" ...> After: select(:category, [], {}, multiple: true, name: "post[category][]") # => <select name="post[category][]" ...>
-
- 22 2月, 2013 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
-