1
1

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 1 year has passed since last update.

Railsの覚えておいた方がいいことを書いておく

Last updated at Posted at 2022-02-06

コマンドたち

  • rails s 起動(WEBサーバpumaが立ち上がる)
  • rails g controller users index コントローラーの作成
  • rails g model user name:string age:integer モデルの作成
  • rails db:migrate DBへの反映
  • rails dbconsole DB構成の確認(.qで抜ける)
  • rake routes URLの設定を確認することができる

※railsコマンドがないって怒られたときは「bundle exec」を実行すると上手くいくことがある。

言葉たち

  • ERB htmlの中にRubyのコードを埋め込むことができる

仕様部分

  • インスタンス変数(@)はViewからアクセスできる
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?