Sha256: a0b8c82e185f82a07e6fe055606d34296d764d50f07283eb723b5e05dad3f621
Contents?: true
Size: 332 Bytes
Versions: 21
Compression:
Stored size: 332 Bytes
Contents
module TagQueryBuilder def build_query_from_filters(q, filters) filters.each do |filter, value| q = method("add_filter_for_#{filter}".to_sym).call(q, value) end return q end # Fucntion to add a like to the name def add_filter_for_like(q, like) q.where '(title LIKE ?)', "%#{like}%" end end
Version data entries
21 entries across 21 versions & 1 rubygems