Module: TalentScout::Controller

Extended by:
ActiveSupport::Concern
Defined in:
lib/talent_scout/controller.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#model_searchTalentScout::ModelSearch

Instantiates TalentScout::Controller::ClassMethods#model_search_class using the current request’s query params. If that class does not exist, a NameError will be raised.

Returns:

Raises:

  • (NameError)

    if the model search class does not exist



56
57
58
59
# File 'lib/talent_scout/controller.rb', line 56

def model_search()
  param_key = self.class.model_search_class.model_name.param_key
  self.class.model_search_class.new(params[param_key])
end