Performance: RESTful resource routes
MEDIUM IMPACT
This affects the server response time and client-side navigation speed by structuring URL routes efficiently.
resources :posts
get '/posts/new', to: 'posts#new' post '/posts', to: 'posts#create' get '/posts/:id/edit', to: 'posts#edit' patch '/posts/:id', to: 'posts#update' delete '/posts/:id', to: 'posts#destroy'
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Manual route definitions for each action | N/A | N/A | N/A | [!] OK |
| RESTful resource routes with 'resources :posts' | N/A | N/A | N/A | [OK] Good |