Class: ActiveRecord::Like::ScopeSpawners::LikeScopeSpawners::Rails72Spawner
- Inherits:
-
AbstractSpawner
- Object
- AbstractSpawner
- ActiveRecord::Like::ScopeSpawners::LikeScopeSpawners::Rails72Spawner
- Includes:
- Shared::Rails7AndBelowSpawner
- Defined in:
- lib/active_record/like/scope_spawner.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from AbstractSpawner
Instance Method Summary collapse
-
#spawn ⇒ Object
:nodoc:.
Methods inherited from AbstractSpawner
Constructor Details
This class inherits a constructor from ActiveRecord::Like::ScopeSpawners::LikeScopeSpawners::AbstractSpawner
Instance Method Details
#spawn ⇒ Object
:nodoc:
126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/active_record/like/scope_spawner.rb', line 126 def spawn opts.each do |k,v| if v.is_a?(Array) && v.empty? opts[k] = '' end end chain_node(Arel::Nodes::Matches) do |nodes| Arel::Nodes::Or.new(nodes) end end |