Changes honeypot family name to address on users sign up form
This commit is contained in:
@@ -2,7 +2,7 @@ class Users::RegistrationsController < Devise::RegistrationsController
|
||||
prepend_before_action :authenticate_scope!, only: [:edit, :update, :destroy, :finish_signup, :do_finish_signup]
|
||||
before_filter :configure_permitted_parameters
|
||||
|
||||
invisible_captcha only: [:create], honeypot: :family_name, scope: :user
|
||||
invisible_captcha only: [:create], honeypot: :address, scope: :user
|
||||
|
||||
def new
|
||||
super do |user|
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
label: false,
|
||||
aria: {describedby: "username-help-text"} %>
|
||||
|
||||
<%= f.invisible_captcha :family_name %>
|
||||
<%= f.invisible_captcha :address %>
|
||||
|
||||
<%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label") %>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ feature 'Registration form' do
|
||||
visit new_user_registration_path
|
||||
|
||||
fill_in 'user_username', with: "robot"
|
||||
fill_in 'user_family_name', with: 'This is the honeypot field'
|
||||
fill_in 'user_address', with: 'This is the honeypot field'
|
||||
fill_in 'user_email', with: 'robot@robot.com'
|
||||
fill_in 'user_password', with: 'destroyallhumans'
|
||||
fill_in 'user_password_confirmation', with: 'destroyallhumans'
|
||||
@@ -65,7 +65,7 @@ feature 'Registration form' do
|
||||
visit new_user_registration_path
|
||||
|
||||
fill_in 'user_username', with: "robot"
|
||||
fill_in 'user_family_name', with: 'This is the honeypot field'
|
||||
fill_in 'user_address', with: 'This is the honeypot field'
|
||||
fill_in 'user_email', with: 'robot@robot.com'
|
||||
fill_in 'user_password', with: 'destroyallhumans'
|
||||
fill_in 'user_password_confirmation', with: 'destroyallhumans'
|
||||
|
||||
Reference in New Issue
Block a user