LoginSignup
0

More than 5 years have passed since last update.

progateに載っていなかった情報を書くブログ(主にコマンド)[学習が進み次第,随時追加]

Last updated at Posted at 2019-01-23
railsチュートリアル 3章より

rails g で失敗した時の戻り方

コントローラー編
$ rails generate controller StaticPages home help
$ rails destroy  controller StaticPages home help

モデル編
  $ rails generate model User name:string email:string
  $ rails destroy model User

マイグレーション編
  $ rails db:migrate
  $ rails db:rollback

ターミナルコマンド

スクリーンショット 2019-01-23 15.54.36.png

application.html.erbの名前を変えたいとき

$ mv app/views/layouts/application.html.erb layout_file

application.html.erbに戻すとき

$ mv layout_file app/views/layouts/application.html.erb

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