Module: ActiveRecord::Like::ScopeSpawners::NotLikeScopeSpawners

Defined in:
lib/active_record/like/scope_spawner.rb

Defined Under Namespace

Classes: AbstractSpawner, Rails71AndBelowSpawner

Class Method Summary collapse

Class Method Details

.spawn(*args) ⇒ ActiveRecord::Relation

Spawn different scopes based on value Data conversion and query string generation are handled by different spanwer classes

Returns:

  • (ActiveRecord::Relation)

    Relation or collection proxy or some AR classs



155
156
157
158
# File 'lib/active_record/like/scope_spawner.rb', line 155

def self.spawn(*args)
  RAILS_VERSION_TO_SPAWNER_CLASS_MAPPINGS.fetch(ActiveRecord.version.to_s[0..2]).
    spawn(*args)
end