Tagged Questions
1
vote
1answer
185 views
Optimizing Rails 3 query code
I am working on a Rails 3 application, and am having some trouble with my user/edit view. In this application, Users can subscribe to Categories. Users and Categories have a has_and_belongs_to_many ...
5
votes
1answer
400 views
Avoiding subqueries in named scopes.
I use named scopes all over the place.
When I have a named scope that deals with two different tables, I tend to query the second table in a subquery. That way, if I mix and match with other tables ...