aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/parameter_filter.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use match? where we don't need MatchDataAkira Matsuda2019-07-291-1/+1
|
* Merge pull request #36370 from ptoomey3/masterRafael França2019-07-231-1/+6
|\ | | | | Add support for Proc based parameter filtering on arrays of values
| * Use style consistent with surrounding codePatrick Toomey2019-05-311-3/+1
| |
| * Fix typoPatrick Toomey2019-05-311-1/+1
| |
| * Recursively process arrays consistentlyPatrick Toomey2019-05-311-1/+8
| | | | | | | | Based on the way parameters are currently processed, a parameter value of type Hash is recursively processed. For a value of type Array however, the current behavior is to simply return the original array, with no filtering. It is not clear what the expected behavior should be. But, doing nothing seems incorrect, since it bypasses custom Proc based parameter filtering all together for arrays of values. This change processes values of type Array consistently. We map over the values and recursively call value_for_key on them. This still works with values of type Hash, since value_for_key already knows how to process Hash values.
* | Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-131-1/+0
|/ | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* Implement AR#inspect using ParamterFilter.Yoshiyuki Kinjo2018-10-191-22/+40
| | | | | | | | | AR instance support `filter_parameters` since #33756. Though Regex or Proc is valid as `filter_parameters`, they are not supported as AR#inspect. I also add :mask option and #filter_params to `ActiveSupport::ParameterFilter#new` to implement this.
* Deprecate ActionDispatch::Http::ParameterFilter in favor of ↵Yoshiyuki Kinjo2018-10-081-0/+106
ActiveSupport::ParameterFilter