If your building a new web app then chances are your going to want to allow your users the ability to upload photos of themselves or friends, it’s the core of getting people to enjoy your site and feel a value within; consider it their 15 seconds of fame.
The Attachment_fu Ruby Gem
So first off your gonna need a guide, thankfully Mike Clark has helped out on this with a really good tutorial on using the aptly named attachment_fu plugin (previously called ‘acts_as_attachment’).
The guide shows you how to install the necessary Rails Image Processor (in this case ‘ImageScience’, a light-weight library that only resizes images, perfect!), and of course the necessary Gem.
Hope this helps, working on integrating it in a couple of my projects, so will let you know how it goes.
Captcha Protection
To stop spammers hacking your site and bots notoriously walloping your user registration screen it’d be a good idea to add a Captcha question to your Registration Form, something that differentiates Humans from Computers.
How’d you do it is pretty simple,
First install the necessary gems,
sudo gem install rmagick
ruby script\plugin install svn://rubyforge.org/var/svn/expressica/plugins/simple_captcha
…this example uses the really neat Simple Captcha gem,
now in your registration form, put this in before the submit tag
<%= show_simple_captcha %>
now in your signup method, add this before .save,
if simple_captcha_valid?
..now the method will only save / register the user IF they answer the captcha question correctly.
good call,
more at simple captcha













