mirror of https://github.com/rails/rails
Remove extraneous array wrapping
We're already conditioning `reflection_fk` based on whether it's an
`Array` or not, so no need to wrap it in this `Array()` call since in
this block it is sure to be an `Array`.
Ref.: d7980c6b10
This commit is contained in:
parent
d7980c6b10
commit
59064f88d8
|
@ -127,7 +127,6 @@ module ActiveRecord
|
|||
reflection_fk = reflection.foreign_key
|
||||
if reflection_fk.is_a?(Array)
|
||||
target_key_values = record ? Array(primary_key(record.class)).map { |key| record._read_attribute(key) } : []
|
||||
reflection_fk = Array(reflection.foreign_key)
|
||||
|
||||
if force || reflection_fk.map { |fk| owner._read_attribute(fk) } != target_key_values
|
||||
reflection_fk.each_with_index do |key, index|
|
||||
|
|
Loading…
Reference in New Issue