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



43
44
45
46
47
# File 'app/finders/autocomplete/routes_finder.rb', line 43

def routables
  return Project.all if current_user.can_admin_all_resources?

  current_user.projects
end