I know it’s kind of stupid, but it is what I need now. So I made it.
- Add the following code to your
Gemfile
gem 'idp_captcha', github: 'niandalu/idp_captcha'
- Mount it in
config/route.rb
mount IdpCaptcha::Engine => '/idp_captcha'
- Request
SERVER/idp_captcha/new
to get:code
- Display the image by assigning src to
SERVER/idp_captcha/:code
- To validate the user input captcha,
DELETE SERVER/idp_captcha/:code
with{ captcha: <USER INPUT> }