Association named error rails3

ran
=Transaction.select(“transactions.id,customers.total_points”).includes(:customers).where(“transactions.customer_id=customers.id”)

after this i got the error like this…

Association named ‘customers’ was not found; perhaps you misspelled
i
t?
But the tables name is correct…

what about association definitions?

On 1 February 2012 12:56, amvis [email protected] wrote:

Transaction.select(“transactions.id,customers.total_points”).includes(:customers).where(“transactions.customer_id=customers.id”)

It may be that your include of customer needs to be singular:

ran=Transaction.select(“transactions.id,customers.total_points”).includes(:customer).where(“transactions.customer_id=customers.id”)