app/controllers/admin/users_controller.rb
def build_custom_logic (filter, query)
    column = filter[:column]
    values = filter[:values]
    op = filter[:op]

    if column == 'confirmed?'
      not_null = values[0] == 'true' || values[0] == '1'

      "confirmed_at IS #{not_null ? 'NOT NULL' : 'NULL'}"
    elsif column == 'role'
      query.with_role(values[0])
    end
  end
# Builds custom filter logic for the query builder used in the index action.
# See {QueryBuilder#initialize} for an understanding.
Builds custom filter logic for the query builder used in the index action.
See {QueryBuilder#initialize} for an understanding.
Builds custom filter logic for the query builder used in the index action . See { QueryBuilder#initialize } for an understanding .
def build_custom_logic (filter, query)
    column = filter[:column]
    values = filter[:values]
    op = filter[:op]
    if column == 'confirmed?'
      not_null = values[0] == 'true' || values[0] == '1'
      "confirmed_at IS #{not_null ? 'NOT NULL' : 'NULL'}"
    elsif column == 'role'
      query.with_role(values[0])
    end
  end
def build_custom_logic ( filter , query ) column = filter [ :column ] values = filter [ :values ] op = filter [ :op ] if column == 'confirmed?' not_null = values [ 0 ] == 'true' || values [ 0 ] == '1' "confirmed_at IS #{not_null ? 'NOT NULL' : 'NULL'}" elsif column == 'role' query . with_role ( values [ 0 ] ) end end
Builds custom filter logic for the query builder used in the index action.
Builds custom filter logic for the query builder used in the index action .
filter
query