I have two Devise models: User and Vendor. I don't want Vendors signing up themselves, so Admin users (controlled by boolean field on users table) should be able to create new Vendors while signed in. Currently when I try this while signed_in, I can't access the vendors_sign_up_path. I get this error from the server:
Filter chain halted as :require_no_authentication rendered or redirected
So apparently to access this page you can't be authenticated? Seems to make sense for most situations, but how can I override this? I've created a custom devise vendors/registrations controller like so to prevent auto-sign-in after sign-up (according to this) :
class Vendors::RegistrationsController < Devise::RegistrationsController
def create
super
end
protected
def sign_up(resource_name, resource)
true
end
end
It seems like I need to override something else in the registrations controller to get this done? Any help is much appreciated, thanks in advance!