LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

rails-destroy

Remove files created by Rails generators

TLDR

Remove model
$ rails destroy model [Name]
copy
Remove controller
$ rails destroy controller [Name]
copy
Remove scaffold
$ rails destroy scaffold [Name]
copy
Remove migration
$ rails destroy migration [Name]
copy

SYNOPSIS

rails destroy generator name [options]

DESCRIPTION

rails destroy is the inverse of rails generate, removing all files and modifications that a generator previously created. It deletes model files, controllers, views, migrations, test files, and route entries that were scaffolded, cleanly undoing the generator's work without leaving orphaned code.The --pretend flag previews which files would be removed without actually deleting anything, allowing verification before committing to the operation. The command accepts the same generator names and arguments as rails generate, making it straightforward to reverse any previous scaffolding operation.

PARAMETERS

model name

Remove model.
controller name
Remove controller.
scaffold name
Remove scaffold.
migration name
Remove migration.
-p, --pretend
Preview without removing.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid