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

Methods included from Warped::Controllers::Searchable

#model_search_scope, #search_param, #search_term

Instance Method Details

#searchObject



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.

Returns:

  • (Hash)

    The search_url_params



30
31
32
33
# File 'lib/warped/controllers/searchable/ui.rb', line 30

def search_url_params(**options)
  url_params = { search_param => search_term }
  url_params.merge!(options)
end

#searched?Boolean

Returns Whether the current action is searched.

Returns:

  • (Boolean)

    Whether the current action is searched.



25
26
27
# File 'lib/warped/controllers/searchable/ui.rb', line 25

def searched?
  @searched ||= false
end