Displaying 1 result from an estimated 1 matches for "aaf51a021d2463fc292250928a104b3".
Did you mean:
aaf51a021d2463fc292250928a104b3e
2013 May 28
3
AR's find_by_* limits return results. How to avoid id?
When I use find_by_name method I get LIMIT 1 result.
> SELECT "users".* FROM "users" WHERE "users"."age" = 25 LIMIT 1
But the "age" column is not unique in my table and its value may repeat.
So I expect that an array of records where "age" is 25 will be returned.
But AR limits the query by 1.
How to avoid it? Or is it the default