rails/activerecord/test/models/tyre.rb
Sean Griffin fb160f6e7d Don't perform statement caching for find when called from a scope
If there is a method defined such as `find_and_do_stuff(id)`, which then
gets called on an association, we will perform statement caching and the
parent ID will not change on subsequent calls.

Fixes #18117
2014-12-22 15:38:58 -07:00

12 lines
160 B
Ruby

class Tyre < ActiveRecord::Base
belongs_to :car
def self.custom_find(id)
find(id)
end
def self.custom_find_by(*args)
find_by(*args)
end
end