active_record should always be set. Do or do not, there is no try
This commit is contained in:
parent
16b70fddd4
commit
5d46c570de
@ -446,7 +446,7 @@ def set_automatic_inverse_of
|
||||
# from calling +klass+, +reflection+ will already be set to false.
|
||||
def valid_inverse_reflection?(reflection)
|
||||
reflection &&
|
||||
klass.name == reflection.active_record.try(:name) &&
|
||||
klass.name == reflection.active_record.name &&
|
||||
klass.primary_key == reflection.active_record_primary_key &&
|
||||
can_find_inverse_of_automatically?(reflection)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user