Changes honeypot family name to address on users sign up form

This commit is contained in:
decabeza
2018-12-20 14:24:11 +01:00
parent d4013ee664
commit cf7155613e
3 changed files with 4 additions and 4 deletions

View File

@@ -2,7 +2,7 @@ class Users::RegistrationsController < Devise::RegistrationsController
prepend_before_action :authenticate_scope!, only: [:edit, :update, :destroy, :finish_signup, :do_finish_signup] prepend_before_action :authenticate_scope!, only: [:edit, :update, :destroy, :finish_signup, :do_finish_signup]
before_filter :configure_permitted_parameters before_filter :configure_permitted_parameters
invisible_captcha only: [:create], honeypot: :family_name, scope: :user invisible_captcha only: [:create], honeypot: :address, scope: :user
def new def new
super do |user| super do |user|

View File

@@ -24,7 +24,7 @@
label: false, label: false,
aria: {describedby: "username-help-text"} %> 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") %> <%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label") %>

View File

@@ -47,7 +47,7 @@ feature 'Registration form' do
visit new_user_registration_path visit new_user_registration_path
fill_in 'user_username', with: "robot" 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_email', with: 'robot@robot.com'
fill_in 'user_password', with: 'destroyallhumans' fill_in 'user_password', with: 'destroyallhumans'
fill_in 'user_password_confirmation', with: 'destroyallhumans' fill_in 'user_password_confirmation', with: 'destroyallhumans'
@@ -65,7 +65,7 @@ feature 'Registration form' do
visit new_user_registration_path visit new_user_registration_path
fill_in 'user_username', with: "robot" 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_email', with: 'robot@robot.com'
fill_in 'user_password', with: 'destroyallhumans' fill_in 'user_password', with: 'destroyallhumans'
fill_in 'user_password_confirmation', with: 'destroyallhumans' fill_in 'user_password_confirmation', with: 'destroyallhumans'