LoginSignup
0
0

More than 3 years have passed since last update.

[Rails] モデルの作成方法

Last updated at Posted at 2020-12-08

役割

モデルの役割はデータベース・テーブルを使って「データを操作・管理する」ことです。

作成方法

rails g model モデル名

モデルや、それに付随するファイルを一度に作成できるコマンドです。

モデルの命名規則は単数形を使用するです。
なので、商品の情報を管理する場合は「product」のように命名しましょう。

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