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.

Sorry, comments are closed for this article.