class Pragma::Filter::Ilike

Attributes

column[R]

Public Class Methods

new(column:, **other) click to toggle source
Calls superclass method Pragma::Filter::Base::new
# File lib/pragma/filter/ilike.rb, line 8
def initialize(column:, **other)
  super(**other)
  @column = column
end

Public Instance Methods

apply(relation:, value:) click to toggle source
# File lib/pragma/filter/ilike.rb, line 13
def apply(relation:, value:)
  relation.where("#{column} ILIKE ?", "%#{value}%")
end