Skip to content

Instantly share code, notes, and snippets.

@oojikoo-gist
Last active September 3, 2015 05:47
Show Gist options
  • Save oojikoo-gist/781263c44534b14f16f9 to your computer and use it in GitHub Desktop.
Save oojikoo-gist/781263c44534b14f16f9 to your computer and use it in GitHub Desktop.
rails: devise_strong_params
def user_params
+ accessible = [ :name, :email ] # extend with your own params
+ accessible << [ :password, :password_confirmation ] unless params[:user][:password].blank?
+ params.require(:user).permit(accessible)
+ end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment