title: rails scope multiple params
body: <p>I have a <code>User</code> model. My goal is to have a scope that returns <code>users</code> found by selected field .</p>
  
  <p>Like</p>
  
  <pre><code>scope :starts_with, -&gt;(filter, starts_with) { where("? like ?", "#{filter}", "#{starts_with}%")}
  </code></pre>
  
  <p>This is in my view:</p>
  
  <pre><code>&lt;%= select_tag(:filter, options_for_select([["Name", "name"],
                                                    ["E-mail", "email"]],
                                                    "name"), {:multiple =&gt; true}) %&gt;
  &lt;%= text_field_tag :starts_with, params[:starts_with] %&gt;
  </code></pre>
  
  <p><strong>UPD</strong> I'm calling scope like that:</p>
  
  <pre><code>def index
    @users = User.starts_with(params[:filter, :starts_with]).paginate(page: params[:page], per_page: 40)
  end
  </code></pre>
  
  <p>At the moment it shows an error <code>ArgumentError: wrong number of arguments(1 for 0)</code></p>
  
  <p>Thanks for any help!</p>