socialforge/app/helpers/activity_notifys_helper.rb

6 lines
261 B
Ruby

module ActivityNotifysHelper
def get_new_notify_count(container,type)
query = ActivityNotify.where('activity_container_id=? and activity_container_type=? and notify_to=? and is_read=0',container.id,type,User.current.id);
return query.count()
end
end