method
stale_state
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::Associations::BelongsToAssociation
stale_state()private
No documentation available.
# File activerecord/lib/active_record/associations/belongs_to_association.rb, line 166
def stale_state
foreign_key = reflection.foreign_key
if foreign_key.is_a?(Array)
attributes = foreign_key.map do |fk|
owner._read_attribute(fk) { |n| owner.send(:missing_attribute, n, caller) }
end
attributes if attributes.any?
else
owner._read_attribute(foreign_key) { |n| owner.send(:missing_attribute, n, caller) }
end
end