Install and use gem invisible_captcha with devise
Quick guide to add gem invisible_captcha to your devise registrations.
Why? For fewer bots to sign up!
Final result:
HOWTO
gemfile:
gem 'invisible_captcha'
console:
bundle
rails g devise:controllers users -c=registrations
app/controllers/users/registrations_controller.rb
class Users::RegistrationsController < Devise::RegistrationsController
invisible_captcha only: [:create]
routes.rb:
devise_for :users, controllers: {
registrations: 'users/registrations'
}
app/views/devise/registrations/new.html.erb, inside the form:
<%= invisible_captcha %>
Did you like this article? Did it save you some time?