Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Created April 8, 2019 20:16
Show Gist options
  • Save chelseatroy/86075ca31c3a3f621de83f43dd0e7239 to your computer and use it in GitHub Desktop.
Save chelseatroy/86075ca31c3a3f621de83f43dd0e7239 to your computer and use it in GitHub Desktop.
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