I have this code:
In app / views / devise / registrations I have the following code:
<div class="row">
<div class="col-md-4 col-md-offset-4">
<h2 class="text-center">Sign up</h2>
<br/>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= render 'shared/devisemes' %>
<div class="form-group">
<%= f.text_field :fullname, autofocus: true, placeholder: "Full name", class: "form-control" %>
</div>
<div class="form-group">
<%= f.email_field :email, autofocus: true, placeholder: "Email", class: "form-control" %>
</div>
<div class="form-group">
<%= f.password_field :password, autocomplete: "off", placeholder: "Password", class: "form-control" %>
</div>
<div class="form-group">
<%= recaptcha_tags %>
</div>
<div class="actions">
<%= f.submit "Sign up", class: "btn btn-primary" %>
</div>
<% end %>
</div>
</div>
In app / controllore / application_controller.rb I have this code:
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
before_action :configure_permitted_parameters, if: :devise_controller?
protected
def configure_permitted_parameters
devise_parameter_sanitizer.permit(:sign_up, keys: [:fullname])
devise_parameter_sanitizer.permit(:account_update, keys: [:fullname])
end
end
In secret.yml I have the following:
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
#recaptcha_site_key: <%= ENV["RECAPTCHA_SITE_KEY"] %>
#recaptcha_secret_key: <%= ENV["RECAPTCHA_SECRET_KEY"] %>
I have put the correct gem in the gemafile file, and I have read several examples but I do not know how to implement recaptcha when the devise parameter. Can someone help me?