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 3 years have passed since last update.

クラスとモデル

Posted at

##クラスとは

  • rubyの概念
  • 複数のデータと処理(メソッド)をまとめて入れた箱(オブジェクト指向)。設計図のようなもの。

##モデルとは

  • railsの概念 Ruby
  • クラスには違いないが、必ずモデルに対応したテーブル(データベース)を持つ
  • 例えばPostモデルにはpostsテーブル(テーブルには複数のデータが入るため名前は複数形になる) => 逆にモデル名は必ず単数形で命名すること。
1
1
1

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?