0
0

【update_attributesが使えない】NoMethodError in RegistrationsController#update【Rails】

Posted at

はじめに

Ruby on Railsにて、以下のエラーが発生しました。

NoMethodError in RegistrationsController#update
undefined method `update_attributes' for #<User:0x000000011065da18>

TL;DR

update_attributesではなくupdateを使用することで解決しました。

Rails6からupdate_attributesは非推奨になっているようです。

参考

https://railsguides.jp/6_0_release_notes.html#active-record-非推奨化

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