diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-02-14 20:46:51 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-02-15 12:06:45 +0900 |
commit | cdb8697b4a654aad2e65590d58c5f581a53d6b33 (patch) | |
tree | 8ac091bcf825ff2bc8dbdca92a0e612fb930a847 /activerecord/test/models | |
parent | 79b8b626216b4f8f24b5606f3edd43d5b14cd2a6 (diff) | |
download | rails-cdb8697b4a654aad2e65590d58c5f581a53d6b33.tar.gz rails-cdb8697b4a654aad2e65590d58c5f581a53d6b33.tar.bz2 rails-cdb8697b4a654aad2e65590d58c5f581a53d6b33.zip |
Revert "Merge pull request #35186 from kamipo/fix_leaking_scope_on_relation_create"
This reverts commit b67d5c6dedbf033515a96a95d24d085bf99a0d07, reversing
changes made to 2e018361c7c51e36d1d98bf770b7456d78dee68b.
Reason: #35186 may cause that silently leaking information when people
upgrade the app.
We need deprecation first before making this.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/bird.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/models/bird.rb b/activerecord/test/models/bird.rb index c9f6759c7d..20af7c6122 100644 --- a/activerecord/test/models/bird.rb +++ b/activerecord/test/models/bird.rb @@ -17,8 +17,8 @@ class Bird < ActiveRecord::Base throw(:abort) end - attr_accessor :total_count + attr_accessor :total_count, :enable_count after_initialize do - self.total_count = Bird.count + self.total_count = Bird.count if enable_count end end |