[RAILS] How to delete a controller etc. using a command


I remember the commands I generate because I use them a lot, but I forgot to delete them, so I'll record them.

I want to delete the generated controller or model

rails d controller(model)Controller name (model name)

Is it d of delete? It deletes all related files.

I want to delete the generated database

rails db:drop

By the way, when creating, rails db: create To delete only the saved data is rails db: reset

Recommended Posts

How to delete a controller etc. using a command
How to delete custom Adapter elements using a custom model
How to execute a contract using web3j
How to sort a List using Comparator
[SpringBoot] How to write a controller test
How to create a jar file or war file using the jar command
How to return a value from Model to Controller using the [Swift5] protocol
[Ethereum] How to execute a contract using web3j-Part 2-
How to generate a primary key using @GeneratedValue
How to delete a new_record object built with Rails
How to launch another command in a Ruby program
How to convert A to a and a to A using AND and OR in Java
[Rails] How to install a decorator using gem draper
How to delete BOM (UTF-8)
How to leave a comment
How to insert a video
How to create a method
How to authorize using graphql-ruby
[Rails] How to delete images uploaded by carrierwave (using devise)
How to output array values without using a for statement
How to join a table without using DBFlute and sql
How to register as a customer with Square using Tomcat
How to add columns to a table
How to make a Java container
How to sign a Minecraft MOD
How to make a JDBC driver
[Java] How to create a folder
How to write a ternary operator
[Swift] How to send a notification
How to make a splash screen
How to make a Jenkins plugin
How to make a Maven project
[Beginner] How to delete NO FILE
How to add the delete function
How to make a Java array
How to build CloudStack using Docker
How to make a hinadan for a Spring Boot project using SPRING INITIALIZR
How to run a mock server on Swagger-ui using stoplight/prism (using AWS/EC2/Docker)
[Rails 6] How to create a dynamic form input screen using cocoon
How to delete only specific data from data created using Form object
How to run a Kotlin Coroutine sample from the command line
How to make a groundbreaking diamond using Java for statement wwww
[Xcode] How to add a README.md file
How to place geckodriver (Selenium WebDriver) on the path using Maven command
How to make a Java calendar Summary
A memorandum on how to use Eclipse
How to redo a deployment on Heroku
How to delete the wrong migration file
[Rails] How to upload images using Carrierwave
How to create a query using variables in GraphQL [Using Ruby on Rails]
How to build a Ruby on Rails environment using Docker (for Docker beginners)
How to run a GIF file from the Linux command line (Ubuntu)
[Basic] How to write a Dockerfile Self-learning ②
How to insert a video in Rails
How to delete the migration file NO FILE
[Java] How to calculate age using LocalDate
How to add a new hash / array
[Introduction to Java] How to write a Java program
How to create a Maven repository for 2020
[Swift] How to use Tab Bar Controller
How to make a Discord bot (Java)