Sha256: 024c9379a130337a02cb674671d4ae90d32d52d512b3f3a59f9e1fa9e111ce4d
Contents?: true
Size: 579 Bytes
Versions: 1
Compression:
Stored size: 579 Bytes
Contents
require "active_record" require_relative "like/scope_spawner" module ActiveRecord module Like module WhereChainExtensions def like(opts, *rest) ActiveRecord::Like::ScopeSpawners::LikeScopeSpawners.spawn(@scope, opts, rest) end def not_like(opts, *rest) ActiveRecord::Like::ScopeSpawners::NotLikeScopeSpawners.spawn(@scope, opts, rest) end end end end ActiveSupport.on_load(:active_record) do ActiveRecord.eager_load! ActiveRecord::QueryMethods::WhereChain.send(:include, ::ActiveRecord::Like::WhereChainExtensions) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
activerecord-like-7.0.1 | lib/active_record/like.rb |