def index
      # Check if search param is present
      if params[:search].blank?
        @admin_redeem_codes = DealRedemptions::RedeemCode.page(params[:page]).order(:code).includes(:company)
      else
        query = DealRedemptions::Redemption.find_by_sql(build_search_query)
        @admin_redeem_codes = Kaminari.paginate_array(query).page(params[:page])
      end
    end
def index
      # Check if search param is present
      if params[:search].blank?
        @admin_redeem_codes = DealRedemptions::RedeemCode.page(params[:page]).order(:code).includes(:company)
      else
        query = DealRedemptions::Redemption.find_by_sql(build_search_query)
        @admin_redeem_codes = Kaminari.paginate_array(query).page(params[:page])
      end
    end
GET /admin/redeem_codes