Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adding Notes to Permitted Params
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