@@ -1,5 +1,16 @@
|
||||
class RegistrationsController < Devise::RegistrationsController
|
||||
|
||||
def create
|
||||
if verify_recaptcha
|
||||
super
|
||||
else
|
||||
build_resource(sign_up_params)
|
||||
flash.now[:alert] = t('recaptcha.errors.verification_failed')
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def sign_up_params
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
<%= f.password_field :password_confirmation, autocomplete: "off" %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= render 'shared/captcha', resource: resource %>
|
||||
|
||||
<div class="actions" style="padding-top:20px">
|
||||
<%= f.submit "Registrarse", class: 'button radius' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user