Class: Autocomplete::RoutesFinder::NamespacesOnly

Inherits:
Autocomplete::RoutesFinder show all
Defined in:
app/finders/autocomplete/routes_finder.rb

Constant Summary

Constants inherited from Autocomplete::RoutesFinder

LIMIT

Instance Attribute Summary

Attributes inherited from Autocomplete::RoutesFinder

#current_user, #search

Instance Method Summary collapse

Methods inherited from Autocomplete::RoutesFinder

#execute, #initialize

Constructor Details

This class inherits a constructor from Autocomplete::RoutesFinder

Instance Method Details

#routablesObject


32
33
34
35
36
# File 'app/finders/autocomplete/routes_finder.rb', line 32

def routables
  return Namespace.all if current_user.admin?

  current_user.namespaces
end