Prototype: String#constantize

February 19th, 2008

String.prototype.constantize || (String.prototype.constantize = function(){
   return this.charAt(0).toUpperCase() + this.substring(1).dasherize().camelize();
});

Sorry, comments are closed for this article.