# frozen_string_literal: true # Modificaciones locales al registro de usuaries # # @see {https://github.com/heartcombo/devise/wiki/How-To:-Use-Recaptcha-with-Devise} class RegistrationsController < Devise::RegistrationsController class SpambotError < StandardError; end prepend_before_action :anti_spambot_traps, only: %i[create] private # Detecta spambots simples def anti_spambot_traps raise SpambotError if params.dig(:usuarie, :name).blank? rescue SpambotError => e ExceptionNotifier.notify_exception(e, data: { params: params }) nil end end