0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Rails】ひとつ前のrailsコマンドをなかったことにする

Last updated at Posted at 2021-06-11

間違えてコントローラーやモデルを作ってしまった

コマンドを打ったものの、想定していないディレクトリで実行してしまったりなどで、コマンドを間違えて売ってしまうことがあると思います。 今回はコントローラとモデルを作って、それを打ち消してみます
#誤って入力したコマンド
rails g controller session new

#上のコマンドを打ち消すコマンド
rails destroy controller session new
rails g model user name:string email:string
#上記コマンドを打ち消すコマンド
rails destroy model user

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?