The relations generated by QueryAssociationColumn.new(:hearts, :count do not have the visible? method. Instead use QueryColumn.new(:hearted_user_count and introduce hearted_user_count method to Heartable objects.
Note that there is an incompatibility of "Like" query filter ID: hearts.count -> hearted_user_count
The change in https://www.redmine.org/projects/redmine/repository/svn/revisions/21645 (#37255: Information Leak in QueryAssociationColumn/QueryAssociationCustomFieldColumn) makes
visible?
method to be called on the query.The relations generated by
QueryAssociationColumn.new(:hearts, :count
do not have thevisible?
method. Instead useQueryColumn.new(:hearted_user_count
and introducehearted_user_count
method to Heartable objects.Note that there is an incompatibility of "Like" query filter ID:
hearts.count
->hearted_user_count
fix #40