Skip to content

Instantly share code, notes, and snippets.

@lbalceda
Last active February 14, 2018 19:20
Show Gist options
  • Save lbalceda/6136282 to your computer and use it in GitHub Desktop.
Save lbalceda/6136282 to your computer and use it in GitHub Desktop.
Fix "unpermitted parameters" devise & rails 4 strong parameters issue
# 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" }
@samschirmer
Copy link

Life saver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment