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