Project

General

Profile

Download (280 Bytes) Statistics
| Branch: | Tag: | Revision:
module ScopedSearchExtensions
extend ActiveSupport::Concern

module ClassMethods
def value_to_sql(operator, value)
return value if operator !~ /LIKE/i
return value.tr_s('%*', '%') if (value ~ /%|\*/)
return "%#{value}%"
end
end
end
(11-11/14)