Class: Lupa::Search::Scope

Inherits:
Object
  • Object
show all
Defined in:
lib/lupa/search.rb

Overview

Base class for defining search scope methods. All search classes must define a nested Scope class that inherits from this.

Examples:

class ProductSearch < Lupa::Search
  class Scope
    def name
      scope.where(name: search_attributes[:name])
    end
  end
end

Since:

  • 0.1.0