LoginSignup
0

More than 1 year has passed since last update.

rails createアクションとは

Posted at

結論

モデルのインスタンス生成と同時にデータベースに保存するメソッドのこと。

.rb
def create
  モデルクラス名.create(引数)# 引数はハッシュ{}は省略可
end

以上です。

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