Adding Notes to Permitted Params
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RegistrationsController < Devise::RegistrationsController | |
# before_action :configure_sign_up_params, only: [:create] | |
# before_action :configure_account_update_params, only: [:update] | |
# GET /resource/sign_up | |
# def new | |
# super | |
# end | |
def create | |
super | |
UserMailer.admin_approval_email(@user).deliver_now #This is the line we are adding | |
end | |
... | |
private | |
def sign_up_params | |
params.require(:user).permit(:email, :password, :password_confirmation, :notes) | |
end | |
def account_update_params | |
params.require(:user).permit(:email, :password, :password_confirmation, :current_password, :notes) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment