Class: Autocomplete::RoutesFinder::ProjectsOnly

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


40
41
42
43
44
# File 'app/finders/autocomplete/routes_finder.rb', line 40

def routables
  return Project.all if current_user.admin?

  current_user.projects
end