Last active
August 29, 2015 14:10
-
-
Save PabloVallejo/b8062b8699f5afcd33e3 to your computer and use it in GitHub Desktop.
Configuring permitted parameters in devisee.
This file contains 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
# | |
# Configure permitted parameters for a devise action. | |
# This can be done in several ways on which this two are | |
# the most used. | |
# | |
def configure_permitted_parameters | |
# Usign a `do` block. | |
devise_parameter_sanitizer.for(:sign_up) do |u| | |
u.permit(:name, :heard_how, | |
:email, :password, :password_confirmation) | |
end | |
# Appending parameter name to array. | |
devise_parameter_sanitizer.for(:account_update) << :my_attribute | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment