Skip to content

Instantly share code, notes, and snippets.

@coffeejunk
Forked from kazpsp/passwords_controller.rb
Created February 28, 2013 11:47
Show Gist options
  • Save coffeejunk/5056196 to your computer and use it in GitHub Desktop.
Save coffeejunk/5056196 to your computer and use it in GitHub Desktop.
# app/controllers/users/password_controller.rb
class Users::PasswordsController < Devise::PasswordsController
def resource_params
params.require(:user).permit(:email, :password, :password_confirmation)
end
private :resource_params
end
# app/controllers/users/registrations_controller.rb
class Users::RegistrationsController < Devise::RegistrationsController
def resource_params
params.require(:user).permit(:name, :email, :password, :password_confirmation)
end
private :resource_params
end
# config/routes.rb
devise_for :users, :controllers => {:registrations => "users/registrations", :passwords => "users/passwords"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment