LoginSignup
0
0

More than 5 years have passed since last update.

Ruby on Railsのアップデート系メソッドまとめ

Posted at

①update
 レコードを更新する。

②update_all
 条件に一致するレコードを更新する。

③update_attribute
 属性ハッシュを指定して更新する。データベースの1つのカラムを変更・保存するメソッド。

④update_attributes
 属性ハッシュを指定して更新する。データベースの値を複数変更・保存するメソッド。

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