Class: Udongo::Search::ResultObjects::Backend::Page
- Inherits:
-
Udongo::Search::ResultObjects::Base
- Object
- Udongo::Search::ResultObjects::Base
- Udongo::Search::ResultObjects::Backend::Page
- Defined in:
- lib/udongo/search/result_objects/backend/page.rb
Overview
This class should be used to further manipulate any of the data provided through #search_context or Udongo::Search::ResultObjects::Base.
A search context class is accessible through #search_context. This gives you access to #search_context.controller, which can be used to call routes upon.
Example of: If an autocomplete requires additional data to be rendered in the partial (think another model, or an API call), one could override the #locals method to include more variables. You could do this directly in the partial as well, but this way we have separation of concerns.
Instance Attribute Summary
Attributes inherited from Udongo::Search::ResultObjects::Base
Instance Method Summary collapse
Methods inherited from Udongo::Search::ResultObjects::Base
#build_html, #hidden?, #initialize, #label, #locals, #partial, #partial_path, #partial_target, #unpublished?
Constructor Details
This class inherits a constructor from Udongo::Search::ResultObjects::Base
Instance Method Details
#url ⇒ Object
17 18 19 |
# File 'lib/udongo/search/result_objects/backend/page.rb', line 17 def url search_context.controller.edit_backend_page_path(searchable) end |