Module: SolidusAdmin::ControllerHelpers::Search::ClassMethods

Defined in:
app/controllers/solidus_admin/controller_helpers/search.rb

Instance Method Summary collapse

Instance Method Details

#search_scope(name, default: false, &block) ⇒ Object



7
8
9
10
11
12
13
# File 'app/controllers/solidus_admin/controller_helpers/search.rb', line 7

def search_scope(name, default: false, &block)
  search_scopes << SearchScope.new(
    name: name.to_s,
    block:,
    default:,
  )
end

#search_scopesObject



15
16
17
# File 'app/controllers/solidus_admin/controller_helpers/search.rb', line 15

def search_scopes
  @search_scopes ||= []
end