abstracting has_many relationship out into reusable hook.