Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

Commit a9a0a8e

Browse files
committed
1 parent c025e15 commit a9a0a8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/methods.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ inflect.camelize = function (lower_case_and_underscored_word, first_letter_in_up
6161
inflect.underscore = function (camel_cased_word) {
6262
var self;
6363
self = util.string.gsub(camel_cased_word, /\./, '/');
64-
self = util.string.gsub(self, /([A-Z]+)([A-Z][a-z])/, '$1_$2');
64+
self = util.string.gsub(self, /([A-Z])([A-Z][a-z])/, '$1_$2');
6565
self = util.string.gsub(self, /([a-z\d])([A-Z])/, '$1_$2');
6666
self = util.string.gsub(self, /-/, '_');
6767
return self.toLowerCase();
@@ -230,5 +230,5 @@ inflect.tableize = function (class_name) {
230230
//
231231
// "business".classify() // => "Busines"
232232
inflect.classify = function (table_name) {
233-
return inflect.camelize(inflect.singularize(util.string.gsub(table_name, /.*\./, '')));
233+
return inflect.camelize(inflect.singularize(util.string.gsub(table_name, /^.*\./, '')));
234234
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy