Skip to content

Commit

Permalink
only use current class and superclass reflections
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcreekroad committed Nov 4, 2019
1 parent c6bc77c commit 3d28d17
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module ActiveRecord
class Base

def self.reflect_on_all_associations
base_class.instance_eval { @associations ||= superclass.instance_eval { (@associations && @associations.dup) || [] } }
@associations ||= superclass.instance_eval { (@associations && @associations.dup) || [] }
end

def self.reflect_on_association(attr)
Expand Down

0 comments on commit 3d28d17

Please sign in to comment.