module Bullet module Detector class NPlusOneQuery < Association extend Dependency class < associations already exists in object_associations. def association?(bullet_key, associations) value = object_associations[bullet_key] if value value.each do |v| result = v.is_a?(Hash) ? v.has_key?(associations) : v == associations return true if result end end return false end end end end end