aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-09-10 19:10:44 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-09-12 18:53:53 +0300
commit59cae0755eea9aa7be4d746427b007f61f33c4ec (patch)
treeeed48bcecd055687714683774b63a17652be3bd8 /activerecord/CHANGELOG.md
parentd1a14865e055091fc2a50ddfd7e9e206152b1095 (diff)
downloadrails-59cae0755eea9aa7be4d746427b007f61f33c4ec.tar.gz
rails-59cae0755eea9aa7be4d746427b007f61f33c4ec.tar.bz2
rails-59cae0755eea9aa7be4d746427b007f61f33c4ec.zip
Add mention about `ActiveRecord::Base::filter_attributes` to the changelog entry
Also remove `# :nodoc:` for `ActiveRecord::Core::ClassMethods` in order to show non-nodoc methods in that module on the api docs http://edgeapi.rubyonrails.org
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 336946b756..0bb5dfe313 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -9,11 +9,16 @@
*Darwin Wu*
-* Configuration item `config.filter_parameters` could also filter out sensitive value of database column when call `#inspect`.
+* Configuration item `config.filter_parameters` could also filter out
+ sensitive values of database columns when call `#inspect`.
+ We also added `ActiveRecord::Base::filter_attributes`/`=` in order to
+ specify sensitive attributes to specific model.
```
Rails.application.config.filter_parameters += [:credit_card_number]
- Account.last.inspect # => #<Account id: 123, credit_card_number: [FILTERED] ...>
+ Account.last.inspect # => #<Account id: 123, name: "DHH", credit_card_number: [FILTERED] ...>
+ SecureAccount.filter_attributes += [:name]
+ SecureAccount.last.inspect # => #<SecureAccount id: 42, name: [FILTERED], credit_card_number: [FILTERED] ...>
```
*Zhang Kang*