Skip to content

bmizerany/sinatra-captcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Quick, simple, fast captcha for Sinatra

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages