rails/activerecord/test/models/drink_designer.rb
Neeraj Singh cd9592959f scope_chain should not be mutated for other reflections
Currently `scope_chain` uses same array for building different
`scope_chain` for different associations. During processing
these arrays are sometimes mutated and because of in-place
mutation the changed `scope_chain` impacts other reflections.

Fix is to dup the value before adding to the `scope_chain`.

Fixes #3882.
2013-10-14 11:59:59 -04:00

4 lines
78 B
Ruby

class DrinkDesigner < ActiveRecord::Base
has_one :chef, as: :employable
end