nl_tokens: * @method humanize () @returns String @short Creates a human readable string . @extra Capitalizes the first word and turns underscores into spaces and strips a trailing _id if any . Like String#titleize this is meant for creating pretty output . @example
pl_tokens: function ( ) { var str = runReplacements ( this , humans ) , acronym ; str = str . replace ( / _id$ / g , '' ) ; str = str . replace ( / (_)?([a-z\d]*) / gi , function ( match , _ , word ) { acronym = hasOwnProperty ( acronyms , <mask> ) ? acronyms [ word ] : null ; return ( _ ? ' ' : '' ) + ( acronym || word . toLowerCase ( ) ) ; } ) ; return capitalize ( str ) ; }