Last active
February 14, 2018 19:20
-
-
Save lbalceda/6136282 to your computer and use it in GitHub Desktop.
Fix "unpermitted parameters" devise & rails 4 strong parameters issue
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
# Fix "unpermitted parameters" devise & rails 4 strong parameters issue | |
# registrations_controller.rb | |
class RegistrationsController < Devise::RegistrationsController | |
... | |
def sign_up_params | |
params.require(:user).permit(:email, :username, :whatever, :other, :params) | |
end | |
end | |
# routes.rb | |
devise_for :users, controllers: {registrations: "registrations" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Life saver.