Sha256: eeda4008611723393a70dc96aa65d16c7a30f32f370aeaa7e48a4eaa2381e9fb
Contents?: true
Size: 446 Bytes
Versions: 11
Compression:
Stored size: 446 Bytes
Contents
# require "eitil_core/application_record/find_by_like" # require "eitil_core/railtie" to run the dynamic dispatch as an init hook during boot require "eitil_core/railtie" module EitilCore module ApplicationRecord module FindByLike Eitil::ApplicationRecordModules << self def find_by_like(_hash) column, like = _hash.first find_by("LOWER(#{column}) LIKE ?", "%#{like.downcase}%") end end end end
Version data entries
11 entries across 11 versions & 1 rubygems