Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bmizerany/sinatra-captcha

Quick, simple, fast captcha for Sinatra
https://github.com/bmizerany/sinatra-captcha

Last synced: about 1 month ago
JSON representation

Quick, simple, fast captcha for Sinatra

Awesome Lists containing this project

README

        

# Quick, simple, easy captcha for Sinatra apps

## Installation
gem install sinatra-captcha



require 'rubygems'
require 'sinatra'
require 'sinatra/captcha'

get '/' do
erb :captcha
end

post '/' do
halt(401, "invalid captcha") unless captcha_pass?
"passed!"
end

__END__

@@ captcha

Catcha Example

<%= captcha_image_tag %>


<%= captcha_answer_tag %>


Thank you to ERR THE BLOG for inspiration:
http://errtheblog.com/posts/43-captchator-on-rails