Archive for the ‘Ruby on rails’ Category

Rails using Captcha

September 3, 2007

SimpleCaptcha 1.0 – REVISION 14(updated) is a stable release. Please update your plugin, if you are still on previous revision.

SimpleCaptcha is a plugin for rubyonrails applications to provide the captcha functionality.
Its implementation is really simple, it requires a single line of code in view and a single line of code in controller/model. The plugin is inspired from the Tore Darell’s capthca plugin validates_captcha (Thanks for the plugin Tore!). The SimpleCaptcha has been coded from scratch where the idea of implementation and keeping it in the simplest form(writing just a single line of code), a variety of image styles, option to select the distortion level of images shows the re-invention of wheel.

Features

  • Provides eight different style of images
  • Can be implemented as controller based or model based
  • Automated removal of old(validated and non-validated both) images.
  • Now, we can add customized CSS to the image, lable and the text field
  • Simple Captcha will bypass the functional/unit/integration tests, so that there will not be any mess in our test cases.
  • Provides three levels of distortion of images as low, medium or high… so now, we have three levels for complexities of images.

update_attribute is now working which was a bug in the previous version, so please update your plugin by checking it out again from the SVN repository svn://rubyforge.org/var/svn/expressica/plugins/simple_captcha

Pre-requisites

1.) RMagick
RMagick is the image handling library in ruby and is required to implement the SimpleCaptcha.
RMagick is available on RubyForge

Installation

  • (recommended… to sync with the latest revision.)
    SVN checkput the plugin as

    1. >>svn co svn://rubyforge.org/var/svn/expressica/plugins/simple_captcha simple_captcha