DEV Community

roeihaviv
roeihaviv

Posted on

Except & only methods after using scaffold

You can decide which pages you want to generate after using scaffold using the following methods in the routes file:

resources :follow_requests, except: [:index, :show, :new, :edit]

generates all pages except index, show, new, and edit.

resources :likes, only: [:create, :destroy]

generates only create and destroy

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs