0.0
No commit activity in last 3 years
No release in over 3 years
It's a Rails Captcha Engine for Rails 3 applications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3.2.0
>= 2.13.1
 Project Readme

rails_captcha

Rails 3.2 Captcha Engine

Gemfile:

gem "rails_captcha"

Controller example:

class MessagesController < ApplicationController include CacheableFlash caches_page :index

There is no need include rails_captcha

Because it is loaded from javascript request on the page

def index # There is no need include rails_captcha too @messages = Message.publish.paginate(per_page) end

def create @message = Message.new(params[:message]) @message.known_captcha = session[:captcha] @message.captcha = params[:captcha] if @message.save ...

Model Example:

class Message < ActiveRecord::Base acts_as_captcha :field => "wrong captcha" ...

View:

= form_for @message, :html => {:class => "simple"} do |f| ... p = form_rails_captcha(@message) p = f.submit "Save" = content_for :footer_javascripts do = javascript_include_tag "/captcha/load_captcha"

config/initializers/rails_captcha.rb:

require 'rails_captcha'

RailsCaptcha::Config.new( :password => 'your_secret_password', :colors => { :background => '#000', :font => "#fff" }, :generate_every => 1 )

Rake Task:

Look:

rake -T | grep rails_captcha