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

+2-2
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)