From 32b03b46150b0161eba2321ccac7678511e3d58e Mon Sep 17 00:00:00 2001 From: Yoshiyuki Kinjo Date: Tue, 9 Oct 2018 16:14:51 +0900 Subject: Implement AR#inspect using ParamterFilter. 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. --- activerecord/CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 00f4ee1aaa..0c3359658d 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -138,13 +138,13 @@ specify sensitive attributes to specific model. ``` - Rails.application.config.filter_parameters += [:credit_card_number] - Account.last.inspect # => # + Rails.application.config.filter_parameters += [:credit_card_number, /phone/] + Account.last.inspect # => # SecureAccount.filter_attributes += [:name] SecureAccount.last.inspect # => # ``` - *Zhang Kang* + *Zhang Kang*, *Yoshiyuki Kinjo* * Deprecate `column_name_length`, `table_name_length`, `columns_per_table`, `indexes_per_table`, `columns_per_multicolumn_index`, `sql_query_length`, -- cgit v1.2.3