Filtering (search) a model with multiple params in hash
Have you looked into using a pre existing gem for this? I found one called has_scope that seems like it might do exactly what you're trying to refactor. You would need to add a scope for each of your filters and then add some has_scope calls in your controller.

Here's a few examples. I'm not as familiar with Rails 3 scopes as I am with 2, so the code likely won't work as is.

Model:

class Profile &lt; ActiveRecord::Base
  scope :country, lambda {|country| where(:country =&gt; country) }
  scope :keyword, lambda {|keyword| where(["keyword LIKE :term", {:term =&gt; "%#{keyword}%"}]) }
  scope :driver, where{:driver =&gt; true)
end


Controller:

class ProfileController &lt; ApplicationController
  has_scope :country
  has_scope :keyword
  has_scope :driver, :type =&gt; :boolean
end