Class: Pageflow::EntryTitleOrAccountNameQuery::Scope Private

Inherits:
Scope
  • Object
show all
Defined in:
app/models/pageflow/entry_title_or_account_name_query.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(term, scope) ⇒ Scope

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Scope.



5
6
7
8
# File 'app/models/pageflow/entry_title_or_account_name_query.rb', line 5

def initialize(term, scope)
  @term = term
  @scope = scope
end

Instance Method Details

#resolveObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
13
14
15
# File 'app/models/pageflow/entry_title_or_account_name_query.rb', line 10

def resolve
  scope
    .joins(:account)
    .references(:pageflow_accounts)
    .where(word_conditions(term))
end