We just released a new open source plugin for rails called Less Reverse Captcha. This is another way of doing captchas. This reverse captcha plugin does not require the user to do anything. Instead it has a hidden form field that won’t be filled out by people (because it’s hidden) but will be filled out by bots. If the field has a value the model won’t validate. That’s it, easy peasy. This plugin is similar to Erik Peterson’s negative captcha The big differences being that the Less plugin acts at the model layer, not the controller and so only needs two lines of code to make work, one for the helper method and one in the model. This plugin is already in use in Lovd By Less and now can be used in your app too!
The default error messages is configurable and obscure: “You can not create this because you are the sux.”
It’s easy to use:
<= flash[:notice] %> <%= errormessagesfor :comment %>
<% form_for @comment do |form| %>
<%= form.textarea :comment %> <%= lessreversecaptchafield :comment %>
<%= submit_tag %> <% end %>
def create @comment = Comment.create params[:comment] if @comment.newrecord? render :action=>‘index’ else redirectto comments_path end end
class Comment < ActiveRecord::Base
validateslessreverse_captcha
That’s it!
If you wanted it to build a product you’d find a way to get time to work on it. If you really wanted to start that new hobby you’d sacrifice something to find the time and money to do it.
I'll define a "Wannabe Entrepreneur" as someone who has never made money from their businesses. Here are the different types of wannabes.
In the past few years I've built go-carts, built a 200+ sq ft workshop, written several eBooks. How do I create a life where I have time to work on side projects?
Receive 5 Software projects mistakes we have made over the years and how to avoid them.