Class: Lcms::Engine::AdminDocumentsQuery
- Defined in:
 - app/queries/lcms/engine/admin_documents_query.rb
 
Overview
Usage:
@documents = AdminDocumentsQuery.call(query_params, page: params[:page])
  Instance Method Summary collapse
- 
  
    
      #call  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Returns: ActiveRecord relation.
 
Methods inherited from BaseQuery
Constructor Details
This class inherits a constructor from Lcms::Engine::BaseQuery
Instance Method Details
#call ⇒ Object
Returns: ActiveRecord relation
      10 11 12 13 14 15 16 17 18 19  | 
    
      # File 'app/queries/lcms/engine/admin_documents_query.rb', line 10 def call @scope = Document.all # initial scope apply_filters if @pagination.present? sorted_scope.paginate(page: @pagination[:page]) else sorted_scope end end  |