Last active
September 3, 2015 05:47
-
-
Save oojikoo-gist/781263c44534b14f16f9 to your computer and use it in GitHub Desktop.
rails: devise_strong_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
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