gitnub/app/controllers/application_controller.rb
2021-09-22 12:35:54 -04:00

15 lines
510 B
Ruby

# frozen_string_literal: true
class ApplicationController < ActionController::Base
before_action :configure_permitted_parameters, if: :devise_controller?
protected
def configure_permitted_parameters
added_attrs = %i[username email password password_confirmation remember_me]
devise_parameter_sanitizer.permit :sign_up, keys: added_attrs
devise_parameter_sanitizer.permit :sign_in, keys: %i[login password]
devise_parameter_sanitizer.permit :account_update, keys: added_attrs
end
end