
Security News
ESLint Adds Support for Parallel Linting, Closing 10-Year-Old Feature Request
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
RMagickCaptcha is a gem that implements captcha for using in Rails application. The gem provides functionality to create a captcha image and validate user's input.
In your Gemfile:
gem "rmagick_captcha", ">= 0.6.2"
In your model:
has_rmagick_captcha :captcha validate :validate_rmagick_captcha
In your controller:
download_rmagick_captcha :show
def new @user = User.new session[:user_captcha] = @user.reset_captcha_key end
def create @user = User.new(params[:user]) @user.captcha_key = session[:user_captcha] @user.save if @user.errors.empty? session[:user_captcha] = nil redirect_back_or_default('/welcome') flash[:notice] = "Thanks for signing up!" else session[:user_captcha] = @user.reset_captcha_key render :action => 'new' end end
In your views:
<% form_for @user, :url => users_path, :html => {:id => "user_form", :class => "html-form" } do |f| %>
In your routes.rb:
match 'user(/show)' => 'user#show', :as => :captcha
If you wish:
-Run ruby script/rails generate rmagick_captcha to gen resources such as locale files. -Use config/initiaizers to configure options for this gem
Example goes here.
Copyright (c) 2011 arufanov, released under the MIT license.
FAQs
Unknown package
We found that rmagick_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
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.