class JsonApiServer::PgJsonbIlikeArray
Searches a jsonb array ['foo', 'bar']. The array is returned as text. It performs an ILIKE %value%. Does not work with multiple values. Postgres only.
Public Instance Methods
to_query(model)
click to toggle source
# File lib/json_api_server/filter_builders.rb, line 122 def to_query(model) val = add_wildcards(value) model.where("#{full_column_name(model)}::text ILIKE :name", name: val) end