disabling Devise registration for production environment only

Edit the user model and remove :registerable, I think that should give you what you want.

Edit:

I think this would work:

if Rails.env.production?
  devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable
else
  devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable, :registerable 
end

Leave a Comment

tech