5

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?

agmcleod
  • 13,321
  • 13
  • 57
  • 96

1 Answers1

4

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

class Users::RegistrationsController < Devise::RegistrationsController
salexander
  • 954
  • 5
  • 10
  • Whoops. Well i fixed the name on the inheritance, and corrected the routes file. (This is why I shouldnt code at 1am ;) ). Though it still looks like I have those routes kicking around. Here's what I see in terms of the registration: http://pastie.org/2491033 – agmcleod Sep 06 '11 at 11:48
  • So I tried what's suggested here: http://sikachu.com/2010/12/my-devise-custom-routes/ Using the skip option, and specified my own. It seems to work. I still get the first list of responses from rake routes for devise/registrations, but doing a POST to /users/sign_up returned route not found, so it seems to be working as expected. I had to change Users:: to Devise:: as well. – agmcleod Sep 06 '11 at 12:15