Socket
Book a DemoInstallSign in
Socket

wxianfeng_simple_captcha

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wxianfeng_simple_captcha

0.5.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

SimpleCaptcha

captcha for Rails

##原理

simple_captcha 的原理是把生成的 key放到session中,key对应的value存到数据库中,到后端进行比对即可

Requirements

  • ImageMagick

Install

Rails < 3.1

gem 'wxianfeng_simple_captcha', '0.1.0', require: 'simple_captcha' 

Rails >=3.1

gem 'wxianfeng_simple_captcha', '0.2.0', require: 'simple_captcha' 

Rails >=4.0

gem 'wxianfeng_simple_captcha', '0.5.0', require: 'simple_captcha'

Setup

rails generate simple_captcha 
rake db:migrate 

Usage

controller:

 include SimpleCaptcha::ControllerHelpers 

view:

 <%= show_simple_captcha %> 

controller valid:

if simple_captcha_valid? 
 "OK!" 
else
 'Fail!'
end

##DEMO

http://d.wxianfeng.com/demos/simple_captcha

FAQs

Package last updated on 14 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.