Created
September 7, 2012 20:18
-
-
Save bloudermilk/3669275 to your computer and use it in GitHub Desktop.
devise + strong_parameters
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
# config/routes.rb | |
MyApp::Application.routes.draw do | |
devise_for :users, controllers: { | |
registrations: "users/registrations" | |
} | |
end |
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
# app/controllers/users/registrations_controller.rb | |
class Users::RegistrationsController < Devise::RegistrationsController | |
protected | |
def resource_params | |
params.require(resource_name).permit(:email, :password, :password_confirmation) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment