Last year we had a project that needed to validate word count on a model attribute, and I extended ActiveRecord::Validations#validates_length_of to include an option to count words. After some back and forth with the rails core team, I ended up with this patch, which was committed into the rails github repo. w00t! :)

PS: some HOWTOs about patching rails here and here.

actionmailer ActionView ActiveRecord activesupport ajax alphadecimal audio autotest BDD blocks capistrano ssh ruby controller css dashboard widget delegate dog puppy naming name DRM email obfuscation exceptions factories-and-workers factory pattern filemerge find and replace finder fink fixtures fun functional testing gem git google maps helper helpers imagemagick Intertrust javascript jquery jrails logo math meetup model openssl OS X patch Pioneer Electronics plugin polymorphism prototype.js rails rails gotcha rails,patch,validations railsconf rake rmagick RSA encryption ruby script shoulda subversion SyncTV TDD testing textmate tips tricks unique hashes unix shell validation view yaml zebra stripes