Module: Warped::Controllers::Searchable::Ui
- Extended by:
- ActiveSupport::Concern
- Includes:
- Warped::Controllers::Searchable
- Included in:
- Tabulatable::Ui
- Defined in:
- lib/warped/controllers/searchable/ui.rb
Instance Method Summary collapse
- #search ⇒ Object
-
#search_url_params(**options) ⇒ Hash
The search_url_params.
-
#searched? ⇒ Boolean
Whether the current action is searched.
Methods included from Warped::Controllers::Searchable
#model_search_scope, #search_param, #search_term
Instance Method Details
#search ⇒ Object
18 19 20 21 22 |
# File 'lib/warped/controllers/searchable/ui.rb', line 18 def search(...) @searched = true super end |
#search_url_params(**options) ⇒ Hash
Returns The search_url_params.
30 31 32 33 |
# File 'lib/warped/controllers/searchable/ui.rb', line 30 def search_url_params(**) url_params = { search_param => search_term } url_params.merge!() end |
#searched? ⇒ Boolean
Returns Whether the current action is searched.
25 26 27 |
# File 'lib/warped/controllers/searchable/ui.rb', line 25 def searched? @searched ||= false end |