title: how to chain where query in rails 3 active record
body: <p>I need to add conditions depending on params data.</p>
  
  <pre><code>@users = User.where('id', params[:id]) unless params[:id].nil?
  @users = User.where('email', params[:email]) unless params[:email].nil?
  @users = User.limit(10)
  </code></pre>
  
  <p>But it does not work for some reason.
  Thanks</p>