From d9e55535164feb1a0f73a9f64c1055cc67b98121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 9 Sep 2015 06:08:57 -0300 Subject: Revert "Merge pull request #20080 from robertjlooby/fix_overwriting_by_dynamic_finders" This reverts commit d5ba9a42a6e93b163a49f99d739aa56820e044d0, reversing changes made to 30c503395bf6bf7db1ec0295bd661ce644628db5. Reason: This generate the dynalic finders more than one time --- activerecord/test/models/electron.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/electron.rb b/activerecord/test/models/electron.rb index aacdaa71b7..6fc270673f 100644 --- a/activerecord/test/models/electron.rb +++ b/activerecord/test/models/electron.rb @@ -2,12 +2,4 @@ class Electron < ActiveRecord::Base belongs_to :molecule validates_presence_of :name - - cattr_reader :times_called_find_by_name - @@times_called_find_by_name = 0 - - def self.find_by_name(name) - @@times_called_find_by_name += 1 - super(name) - end end -- cgit v1.2.3