include average method in activerecord associations