diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-26 13:56:20 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:20 -0500 |
commit | 1d3e5bdd24f25e1870f3d3bec1c81040a423f138 (patch) | |
tree | 4c586be72d8ebe144420bdd33e16a7e08e72a643 /app/controllers/auth | |
parent | 0622450209274a9051c03458156a694f2274f61e (diff) |
[Spam Prevention] Add username confirmation and simple, frictionless anti-spam mechanism
Diffstat (limited to 'app/controllers/auth')
-rw-r--r-- | app/controllers/auth/registrations_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb index 96d973394..55975b274 100644 --- a/app/controllers/auth/registrations_controller.rb +++ b/app/controllers/auth/registrations_controller.rb @@ -35,6 +35,12 @@ class Auth::RegistrationsController < Devise::RegistrationsController end end + def create + super do |resource| + return redirect_to root_path if resource.destroyed? + end + end + protected def update_resource(resource, params) @@ -55,7 +61,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController def configure_sign_up_params devise_parameter_sanitizer.permit(:sign_up) do |u| - u.permit({ account_attributes: [:username], invite_request_attributes: [:text] }, :email, :password, :password_confirmation, :invite_code, :agreement) + u.permit({ account_attributes: [:username], invite_request_attributes: [:text] }, :username, :email, :password, :password_confirmation, :kobold, :invite_code, :agreement) end end |