Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup devise with custom registration controller

I'm working on a rails site using devise, where we do not want user sign ups just yet. User authentication is so we can login to access restricted parts of the site and add/edit things as we see fit. So for now, I created the following controller:

class Users::RegistrationController < Devise::SessionsController
  def new

  end
end

And setup my routes in this fashion:

devise_for :users, :controllers => { :registration => "users/registration" }

However, when I run rake routes, I still see a returned value for the create action on the registration controller. Any ideas on how to get rid of it?

like image 503
agmcleod Avatar asked Oct 10 '22 02:10

agmcleod


1 Answers

Try using :registrations instead of :registration. Also, it seems like your custom controller class should be defined via:

class Users::RegistrationsController < Devise::RegistrationsController
like image 195
salexander Avatar answered Oct 17 '22 23:10

salexander