Freelancing Gods 2015

13 May 2008

Link: Tip #4 - Validating an Email Address with Ruby on Rails

"TMail has an “Address” class. It will throw an invalid address exception if given an address it can’t handle (and it has about 2,000 test cases of email addresses it can handle, so you are pretty safe.)"

04 Dec 2007


Rails code snippet for the day: validates_uniqueness_of_set. Useful for making sure each specific combination of the specified attributes is unique. Example from the pastie:

validates_uniqueness_of_set :first_name, :last_name

Just like the options it accepts, the code is very similar to validates_uniqueness_of – and the few tests I’ve thrown at it are handled without any problems.

14 Jan 2007

Link: Alex Payne | Announcing Acts As Sanitized

12 Jan 2007

Link: Really easy field validation * Dexagogo

11 Aug 2006

Link: Opinion - Create your own validates_abc_of validation

03 Jul 2006

Link: Rails - Assert Valid Markup Tests

25 Feb 2006

Link: A List Apart: Articles: Validating a Custom DTD

Good overview of how to properly add custom attributes to xhtml elements

RssSubscribe to the RSS feed

About Freelancing Gods

Freelancing Gods is written by , who works on the web as a web developer in Melbourne, Australia, specialising in Ruby on Rails.

In case you're wondering what the likely content here will be about (besides code), keep in mind that Pat is passionate about the internet, music, politics, comedy, bringing people together, and making a difference. And pancakes.

His ego isn't as bad as you may think. Honest.

Here's more than you ever wanted to know.

Open Source Projects

Other Sites

Creative Commons Logo All original content on this site is available through a Creative Commons by-nc-sa licence.