Math_captcha helps you generating localized captchas for forms. It presents a simple math operation that should be performed by user in order to ensure she is a human.
This Gem is strongly inspired in visualcaptcha gem (https://github.com/kimenye/visualcaptcha)
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install math_captcha
After installation, follow these simple steps to setup the plugin. The setup will depend on the version of rails your application is using.
$ rails generate math_captcha
In the view file within the form tags add this code
<%= show_math_captcha %>
Add the following line in the file "app/controllers/application.rb"
ApplicationController < ActionController::Base include MathCaptcha::ControllerHelpers end
math_captcha currently supports I18n for:
- English (en)
- Spanish (es)
- Basque (eu)
It defaults to I18n.locale or Spanish.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request