 <p><strong>ROUTES</strong></p> <p>replace this </p> <pre><code>match "/users?q=" =&gt; "users#show", :via =&gt; [:get] </code></pre> <p>to this</p> <pre><code>get "users" =&gt; "users#show" get "users/:q" =&gt; "users#show" </code></pre> <p>and</p> <p><strong>CONTROLLER</strong></p> <pre><code>def set_user @user ||= EvercamUser.find(:all, :conditions =&gt; ["id = ? or email = ?", params[:q], params[:q]]) end </code></pre>