
Security News
Researcher Exposes Zero-Day Clickjacking Vulnerabilities in Major Password Managers
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
== CustomCaptcha
CustomCaptcha is a simple and custom captcha plugin for Rails3.
== Supported versions
Ruby 1.8.7, 1.9.2, 1.9.3
Rails 3.0.x, 3.1
ImageMagick should be installed on your machine to use this plugin.
== Installation
In your app's Gemfile
, add:
gem "custom_captcha", :git => "git://github.com/vkill/custom_captcha.git"
Then run:
bundle
rails generate custom_captcha:install
If you want to modify default captcha images storage location, edit your config/initializers/custom_captcha.rb
Then run:
bundle exec rake custom_captcha:generate_images[100]
== Base Usage
=== View helper
In the view file within the form tags add this code
<%= display_custom_captcha %>
and in the controller's action authenticate it as
if custom_captcha_valid?(params[:custom_captcha]) flash[:notice] = "captcha did match." else flash[:notice] = "captcha did not match." end
=== FormBuilder helper
In the model class add this code
class User < ActiveRecord::Basse apply_custom_captcha end
and in the view file within the form tags write this code
<%= form_for @user do |form| -%> ... <%= form.custom_captcha %> ... <% end -%>
== Usage your custom captcha area template
first, copy and modify your custom captcha area template
cd app/views/custom_captcha/captcha_styles/
cp _default.html.erb _mycaptcha.html.erb
and then in the view file your the use of
<%= display_custom_captcha(:template => :mycaptcha) %>
== Options & Examples
=== Helper Options, View helper and FormBuilder helper
template - use your custom template
label_text - custom label text
key_id - custom captcha hidden input key id
key_name - custom captcha hidden input key name
field_name - custom captcha input field name
img_id - custom captcha img id
change_text - custom change text
=== Examples
<%= display_custom_captcha(:img_id => :captcha, :label_text => "captcha", :field_name => :captcha %>
== I18n supported
== Copyright
Copyright (c) 2011 vkill.net .
FAQs
Unknown package
We found that custom_captcha demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.