Refactor routes.rb
chrisma opened this issue · 2 comments
chrisma commented
root
seems to be routed twice- Little usage of scopes
- Little usage of Rails resource helpers
- Little structure
- Why are params in routes constrained to
{ id: /.*/ }
? Are params strings and not ids? EDIT: Yes
chrisma commented
the route to reject a request was defined as patch '/vms/requests/reject', to: 'requests#reject', as: 'reject'
, now it's
scope 'vms' do
resources :requests, path: 'requests' do
patch :reject, on: :collection
end
end
No :id
param is passed in the route. However, reject
in app/controllers/requests_controller.rb
uses a param...