Class: Autocomplete::RoutesFinder
- Inherits:
-
Object
- Object
- Autocomplete::RoutesFinder
- Defined in:
- app/finders/autocomplete/routes_finder.rb
Overview
Finder that returns a list of routes that match on the `path` attribute.
Direct Known Subclasses
Defined Under Namespace
Classes: NamespacesOnly, ProjectsOnly
Constant Summary collapse
- LIMIT =
20
Instance Attribute Summary collapse
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
-
#search ⇒ Object
readonly
Returns the value of attribute search.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(current_user, params = {}) ⇒ RoutesFinder
constructor
A new instance of RoutesFinder.
Constructor Details
#initialize(current_user, params = {}) ⇒ RoutesFinder
Returns a new instance of RoutesFinder.
10 11 12 13 |
# File 'app/finders/autocomplete/routes_finder.rb', line 10 def initialize(current_user, params = {}) @current_user = current_user @search = params[:search] end |
Instance Attribute Details
#current_user ⇒ Object (readonly)
Returns the value of attribute current_user.
6 7 8 |
# File 'app/finders/autocomplete/routes_finder.rb', line 6 def current_user @current_user end |
#search ⇒ Object (readonly)
Returns the value of attribute search.
6 7 8 |
# File 'app/finders/autocomplete/routes_finder.rb', line 6 def search @search end |