Class: SnFilterable::SearchComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/sn_filterable/search_component.rb

Overview

Renders the optional search bar

Instance Method Summary collapse

Constructor Details

#initialize(filtered:, filter_name:) ⇒ SearchComponent

Returns a new instance of SearchComponent.

Parameters:

  • filtered (Filtered)

    The filtered instance

  • filter_name (String)

    The search filter’s parameter name



8
9
10
11
# File 'app/components/sn_filterable/search_component.rb', line 8

def initialize(filtered:, filter_name:)
  @filtered = filtered
  @filter_name = filter_name
end