4
votes
3answers
108 views

Search for User by first and/or last name, efficiently

I am refactoring a user search that just feels dirty. (Users#search) I need to allow a blank param to search on partial or only a first or last, but don't want to return all the records in the ...
0
votes
1answer
64 views

In ruby how can I break down this method into smaller components?

For work, my colleague and I sketched this method up as a brain dump of how we want this method to work. What I am trying to figure out is how can we break this method into smaller components so that ...
0
votes
1answer
163 views

Review my ruby for performance

So I'm using the acts_as_taggable_on gem to tag 3 different models: Question, Blog, and ...
1
vote
1answer
296 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 ...
2
votes
3answers
504 views

Extracting and mangling a parameter from a MySQL configuration file

Is there a better way of doing this? ...
6
votes
1answer
536 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 ...