Skip to content

Instantly share code, notes, and snippets.

@bloudermilk
Created September 7, 2012 20:18
Show Gist options
  • Save bloudermilk/3669275 to your computer and use it in GitHub Desktop.
Save bloudermilk/3669275 to your computer and use it in GitHub Desktop.
devise + strong_parameters
# config/routes.rb
MyApp::Application.routes.draw do
devise_for :users, controllers: {
registrations: "users/registrations"
}
end
# 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