2
votes
1answer
208 views

Rails 3: How can I improve this ActiveRecord count

Here I retrieve a collection of causes from the database. Along with the information from each cause, I want to send the number of users in each cause. This way works, but if experience has told me ...
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 ...