title: Rails active record query for search filters
body: <p>Looking at the railscasts.com, I am wondering how Ryan implemented the search filters for the site. If the search param does not match anything in the database, then he is returning ALL records (for example, if we type an invalid param for the search param value in the URL, all records are returned because there is nothing to filter on). If it matches records in the database he is returning only those matching records.</p>
  
  <p>How is being achieved? Can I use only Active Record without any gems/full-text-search for this? How would that query look like with Arel?</p>
  
  <p>Also, how does he implement the filters link (links at the top of the page after we do a search)? Is he parsing through each of the search params and generating the links on the page by stripping out the search params one at a time? </p>