Sha256: 3f503ca928bc161ce36475f3f9890f4a84c5013dba3646d46280020854288308

Contents?: true

Size: 865 Bytes

Versions: 2

Compression:

Stored size: 865 Bytes

Contents

===============================================================================

1. Setup "config/initializers/dalli_captcha.rb"

2. Mount RedisCaptcha::Engine in your router.rb

   mount RedisCaptcha::Engine => '/captcha', :as => :captcha

3. Add to your controller

   before_filter :generate_captcha_key

4. Add to your model

   include RedisCaptcha::Model

5. If you set "config.active_record.whitelist_attributes = true" in "config/application.rb", remember to add attr_accessible to your model

   attr_accessible :captcha, :captcha_key

6. Add to your view

<%= image_tag(captcha_path(:timestamp => Time.now.to_i), :alt => "captcha") %>
<%= f.text_field :captcha %>
<%= f.hidden_field :captcha_key, :value => session[:captcha_key] %>

Enjoy it :)

===============================================================================

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dalli_captcha-0.0.2 lib/generators/templates/README
dalli_captcha-0.0.1 lib/generators/templates/README