LoginSignup
0
0

More than 3 years have passed since last update.

[rails]devise:メールアドレス・パスワード以外がデータベースに保存できない時

Last updated at Posted at 2020-05-13

◆結論
deviseの初期状態では、メールアドレスとパスワード以外は
データベースへの保存を許可されていないため、下記内容でカラム毎に
追加の許可を出してあげる必要があります。

ストロングパラメーター

app/controllers/application_controller.rb
def configure_permitted_parameters
    devise_parameter_sanitizer.permit(:sign_up, keys: [:nickname, :first_name, :first_name_furigana, :tel_number, :last_name, :last_name_furigana, :birthday])
  end

以上です。

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