diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-09-10 12:41:14 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-09-12 18:51:55 +0300 |
commit | d40e33fcc5899a91ceab10f8bd86a1455846917a (patch) | |
tree | 84823d526b1be0336f2a3f886fdd88bb2043c2b6 /actionpack/lib/action_pack | |
parent | 9945cd097a46771aedfcb9abc110419198452022 (diff) | |
download | rails-d40e33fcc5899a91ceab10f8bd86a1455846917a.tar.gz rails-d40e33fcc5899a91ceab10f8bd86a1455846917a.tar.bz2 rails-d40e33fcc5899a91ceab10f8bd86a1455846917a.zip |
DRY `activerecord/lib/active_record/core.rb` and fix tests
- Move
```
filter_attributes = self.filter_attributes.map(&:to_s).to_set
filter_attributes.include?(attribute_name) && !read_attribute(attribute_name).nil?
```
to private method.
- Fix tests in `activerecord/test/cases/filter_attributes_test.rb`
- Ensure that `teardown` sets `ActiveRecord::Base.filter_attributes` to
previous state.
- Ensure that `Admin::Account.filter_attributes` is set to previous
state in the "filter_attributes could be overwritten by models" test.
Follow up #33756
Diffstat (limited to 'actionpack/lib/action_pack')
0 files changed, 0 insertions, 0 deletions