socialforge/app/helpers/activity_notifys_helper.rb

6 lines
261 B
Ruby
Raw Normal View History

2015-06-05 16:20:26 +08:00
module ActivityNotifysHelper
def get_new_notify_count(container,type)
2015-06-12 11:55:29 +08:00
query = ActivityNotify.where('activity_container_id=? and activity_container_type=? and notify_to=? and is_read=0',container.id,type,User.current.id);
2015-06-05 16:20:26 +08:00
return query.count()
end
end