fb160f6e7d
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
12 lines
160 B
Ruby
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
|