title: Pagination errors in ruby on rails report
body: <p>I've recently started learning ruby-on-rails and now I've got to the point where I can create something but still not very comfortable with syntax.
  In report view,when i paginate to the 2nd page it gives me a error.</p>
  
  <p>But paginations were corrected in yesterday.Today i edited some checkboxes using params.dig method to hold the checkbox values.those values are also need to disply in 2nd page.What's the problem with my controller</p>
  
  <p>This is my view</p>
  
  <pre><code> %br
            .row
              .col-md-3
                = check_box_tag "search_customer_supplier[accounts_dealer_types.dealer_code][]","CUS", params.dig('search_customer_supplier', 'accounts_dealer_types.dealer_code') == "CUS"
                = label_tag "Organizational Customer"
              .col-md-3
                = check_box_tag "search_customer_supplier[accounts_dealer_types.dealer_code][]", "SUP", params.dig('search_customer_supplier', 'accounts_dealer_types.dealer_code') == "SUP"
                = label_tag "Organzational Supplier"
              .col-md-3
                = check_box_tag "search_customer_supplier[accounts_dealer_types.dealer_code][]", "INDCUS", params.dig('search_customer_supplier', 'accounts_dealer_types.dealer_code') == "INDCUS"
                = label_tag "Individual Customer"
              .col-md-3
                = check_box_tag "search_customer_supplier[accounts_dealer_types.dealer_code][]", "INDSUP", params.dig('search_customer_supplier', 'accounts_dealer_types.dealer_code') == "INDSUP"
                = label_tag "Individual Supplier"
  </code></pre>
  
  <p>This is my controller</p>
  
  <pre><code> def customer_supplier_report
      Organization
      Address
      ContactNumber
      refined_query = ""
      if params[:search].present? or params[:excel_report].present?
  
        search_customer_supplier = params[:search_customer_supplier]
  
        if params[:organization_children].present? and search_customer_supplier["id"].present?
          organization_id = search_customer_supplier["id"]
          organization = Organization.find(organization_id)
          anchestor_ids = organization.anchestors.map{|o| o[:member].id }
          search_customer_supplier["id"] = "(#{anchestor_ids.join(' OR ')})" if anchestor_ids.any?
        end
  
        params[:search_customer_supplier]['accounts_dealer_types.dealer_code'] = params[:search_customer_supplier]['accounts_dealer_types.dealer_code'].join(" OR ") if params[:search_customer_supplier]['accounts_dealer_types.dealer_code'].present?
  
        # puts params[:search_customer_supplier]['accounts_dealer_types.dealer_code']
  
        customer_report = params[:search_customer_supplier].map { |k, v| "#{k}:#{v}" if v.present? }.compact
      else
        customer_report = ["accounts_dealer_types.dealer_code:(CUS OR SUP OR INDCUS OR INDSUP)"]
      end
  </code></pre>
  
  <p>In my browser showing me where are the error lines in controller.Those are,</p>
  
  <pre><code>params[:search_customer_supplier]['accounts_dealer_types.dealer_code'] = params[:search_customer_supplier]['accounts_dealer_types.dealer_code'].join(" OR ") if params[:search_customer_supplier]['accounts_dealer_types.dealer_code'].present?
  </code></pre>
  
  <p>This is output errors that i got</p>
  
  <p>NoMethodError in ReportsController#customer_supplier_report</p>
  
  <p>undefined method `join' for "CUS":String Did you mean? JSON</p>