```
resources :books do
  collection do
   get :autocomplete
  end
end
```