LoginSignup
0
0

More than 1 year has passed since last update.

CRUDについて

Posted at

はじめに

CRUD処理について解説します。

CRUD処理とは

まず、CRUD処理とは何かについての理解を深めていきましょう。

CRUD処理とは新規作成(Create)表示(Read)
更新(Update)削除(Delete)の4つです。

それぞれの頭文字を合わせて、CRUDと呼ばれています。
これはWebアプリ開発の基本で、アプリは概ねこの4つの機能で作成されているといわれています。

CRUD処理の詳細について

1. create(作成)
例)comment.save

2. read(読み取り)
例)comment.all, comment.find(params[:id])

3. update(更新)
例)comment.update(comment_params)

4. destroy(削除)
例)comment.destroy

→ 上記に記載をした、それぞれの頭文字をとってCRUDといわれています。

おわりに

今回はCRUDについて学びました。

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