2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Devise_invitationで招待をアクセプトする際に名前も登録できるようにする。

Last updated at Posted at 2018-06-12
  • 以下のサイトが非常に参考になったが、deviseの変数許可の部分ではまったのでメモ。

app/controllers/application_controller.rb
省略

before_action :configure_permitted_parameters, if: :devise_controller?

  protected

  def configure_permitted_parameters
    devise_parameter_sanitizer.permit(:invite, keys: [:email])
    devise_parameter_sanitizer.permit(:accept_invitation, keys: [:password, :password_confirmation, :invitation_token, :name])
  end

参考
https://qiita.com/ry023/items/c6a469f65615f796be45

追加

ちなみに、プロフィール変更の場合は、:account_updateが許可対象になる。

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?