Created
April 8, 2019 20:16
-
-
Save chelseatroy/86075ca31c3a3f621de83f43dd0e7239 to your computer and use it in GitHub Desktop.
Adding Notes to Permitted Params
This file contains hidden or 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