dubstep
#1
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…
amvis
#2
what about association definitions?
amvis
#3
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”)