lib/activity_notification/orm/mongoid/notification.rb
def opened_group_member_notifier_count(limit = ActivityNotification.config.opened_index_limit)
            limit == 0 and return 0
            group_members.opened_only(limit)
                         .where(notifier_type: notifier_type)
                         .where(:notifier_id.ne => notifier_id)
                         .distinct(:notifier_id)
                         .to_a.length #.count(true)
          end
# Returns count of group member notifiers of the opened notification not including group owner notifier.
# This method is designed to cache group by query result to avoid N+1 call.
# @api protected
# @todo Avoid N+1 call
#
# @param [Integer] limit Limit to query for opened notifications
# @return [Integer] Count of group member notifiers of the opened notification
Returns count of group member notifiers of the opened notification not including group owner notifier.
This method is designed to cache group by query result to avoid N+1 call.
Returns count of group member notifiers of the opened notification not including group owner notifier . This method is designed to cache group by query result to avoid N + 1 call .
def opened_group_member_notifier_count(limit = ActivityNotification.config.opened_index_limit)
            limit == 0 and return 0
            group_members.opened_only(limit)
                         .where(notifier_type: notifier_type)
                         .where(:notifier_id.ne => notifier_id)
                         .distinct(:notifier_id)
                         .to_a.length 
          end
def opened_group_member_notifier_count ( limit = ActivityNotification . config . opened_index_limit ) limit == 0 and return 0 group_members . opened_only ( limit ) . where ( notifier_type : notifier_type ) . where ( :notifier_id . ne => notifier_id ) . distinct ( :notifier_id ) . to_a . length end
Returns count of group member notifiers of the opened notification not including group owner notifier.
Returns count of group member notifiers of the opened notification not including group owner notifier .
#.count(true)
Count of group member notifiers of the opened notification
Count of group member notifiers of the opened notification
Integer
limit
config
opened_index_limit
limit Limit to query for opened notifications
limit Limit to query for opened notifications
api
None
todo
Avoid N+1 call
Avoid N + 1 call