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 it? But the tables name is correct…

what about association definitions?

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")