title: How to persist ransack searching parameters
body: <p>I'm using <a href="https://github.com/ernie/ransack" rel="nofollow">ransack</a> for searching users based on their company and active/inactive parameter. This works well when used individually, but I want to make use of both simultaneously. For example, if I select company first and then select active/inactive user, then the company name should persist.</p>
  
  <p>Second, is there a facility in ransack to keep both values persisted when I click back or again on users?</p>
  
  <p>UPDATE :</p>
  
  <p>This is my view:</p>
  
  <pre><code>= search_form_for @search, url: search_users_path, method: :post, html: { class: 'sort' } do |f|
    = f.label 'company:'
    = f.select :company_id_eq,
    Company.where('is_inactive = false').collect {|c| [ c.name, c.id ] },
    {:include_blank =&gt; 'All company users'}, :'data-remote' =&gt; true, class: 'searchSelect searchUserSelect'
  
    %div.sort_users
      = f.label 'sort Users:'
      = f.select :deleted_eq,
      [raw("&lt;option value= 0 selected=#{session[:deleted]}&gt;Active Users&lt;/option&gt;&lt;option value= 1&gt;Inactive Users&lt;/option&gt;")],
      {}, :'data-remote' =&gt; true, class: 'searchSelect searchUserSelect', style: "width: 205px;"
  </code></pre>
  
  <p>This is my code in controller</p>
  
  <pre><code>@search = User.search(params[:q])
  @users = @search.result.includes(:company).order("companies.name, last_name").page(params[:page]).per(20)
  </code></pre>