We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In this example, Name and Nickname are posted to the controller, but they are not written to the database.
Is this a bug or a parameter I'm missing?
devise (4.3.0) devise_token_auth (0.1.42)
INFO -- : Started POST "/auth" for 162.158.69.81 at 2017-05-29 03:17:20 +0000 INFO -- : Processing by DeviseTokenAuth::RegistrationsController#create as HTML INFO -- : Parameters: {"name"=>"jared jennings", "email"=>"jared@fake.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "nickname"=>"JJ", "registration"=>{"name"=>"jared jennings", "email"=>"jared@fake.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "nickname"=>"JJ"}} DEBUG -- : (0.8ms) BEGIN DEBUG -- : (2.2ms) SELECT COUNT(*) FROM "users" WHERE "users"."provider" = $1 AND "users"."email" = $2 [["provider", "email"], ["email", "jared@fake.com"]] DEBUG -- : SQL (1.1ms) INSERT INTO "users" ("uid", "encrypted_password", "email", "tokens", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["uid", "jared@fake.com"], ["encrypted_password", "$2a$1"], ["email", "jared@fake.com"], ["tokens", "{}"], ["created_at", "2017-05-29 03:17:20.407555"], ["updated_at", "2017-05-29 03:17:20.407555"]]
The text was updated successfully, but these errors were encountered:
Never mind. I just needed to add the devise_parameter_santitizer statements.
class ApplicationController < ActionController::API [...] before_action :configure_permitted_parameters, if: :devise_controller? protected def configure_permitted_parameters Rails.logger.info "in ApplicationController.rb configure_permitted_parameters!" devise_parameter_sanitizer.permit(:sign_up, keys: [:username, :name, :nickname]) end end
Sorry, something went wrong.
No branches or pull requests
In this example, Name and Nickname are posted to the controller, but they are not written to the database.
Is this a bug or a parameter I'm missing?
The text was updated successfully, but these errors were encountered: