Module: ActiveElement::Components::TextSearch
- Defined in:
- lib/active_element/components/text_search.rb,
lib/active_element/components/text_search/sql.rb,
lib/active_element/components/text_search/component.rb,
lib/active_element/components/text_search/authorization.rb
Overview
Provides back end for live text search components.
Defined Under Namespace
Classes: Authorization, Component, Sql
Class Attribute Summary collapse
-
.authorized_text_searches ⇒ Object
readonly
Returns the value of attribute authorized_text_searches.
Class Method Summary collapse
- .register_authorized_text_search(model:, with:, providing:) ⇒ Object
- .text_search_options(model:, with:, providing:) ⇒ Object
Class Attribute Details
.authorized_text_searches ⇒ Object (readonly)
Returns the value of attribute authorized_text_searches.
15 16 17 |
# File 'lib/active_element/components/text_search.rb', line 15 def @authorized_text_searches end |
Class Method Details
.register_authorized_text_search(model:, with:, providing:) ⇒ Object
17 18 19 |
# File 'lib/active_element/components/text_search.rb', line 17 def (model:, with:, providing:) << [model, with, providing] end |
.text_search_options(model:, with:, providing:) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/active_element/components/text_search.rb', line 21 def (model:, with:, providing:) { search: { model: model.name.underscore, with: with, providing: providing }, placeholder: "Search for #{model.name.titleize} by #{humanized_names(with).join(', ')}..." } end |