Sha256: 869f925be9104ac9b8c1cad99b9aeb0322d79f1793f844ecdb7e051a6c93c070

Contents?: true

Size: 836 Bytes

Versions: 2

Compression:

Stored size: 836 Bytes

Contents

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

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

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

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

3. Add to your controller

   before_filter :generate_captcha_key

4. Add to your model

   include DalliCaptcha::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.1.0 lib/generators/templates/README
dalli_captcha-0.0.3 lib/generators/templates/README