use of scopes in associations