This line in ActiveHashRelation::AssociationFilters.filter_associations: association_name.singularize.constantize.unscoped.all
assumes that the association name always matches the association class. As a result, the associations filter doesn't always work as expected on those rare instances where convention cannot be followed.
Suggested change:
association.class_name.constantize.unscoped.all
This line in
ActiveHashRelation::AssociationFilters.filter_associations
:association_name.singularize.constantize.unscoped.all
assumes that the association name always matches the association class. As a result, the associations filter doesn't always work as expected on those rare instances where convention cannot be followed. Suggested change:association.class_name.constantize.unscoped.all