We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed39a4a commit ae1215dCopy full SHA for ae1215d
autoload/rails.vim
@@ -589,10 +589,11 @@ endfunction
589
590
function! rails#pluralize(word)
591
let word = a:word
592
+ let last_word = s:sub(word, '^.+_|:', '')
593
if word == ''
594
return word
- elseif has_key(g:rails_custom_pluralize, s:sub(word, '^:', ''))
595
- return g:rails_custom_pluralize[s:sub(word, '^:', '')]
+ elseif has_key(g:rails_custom_pluralize, last_word)
596
+ return s:sub(word, last_word . '$', g:rails_custom_pluralize[last_word])
597
endif
598
let word = s:sub(word,'[aeio]@<!y$','ie')
599
let word = s:sub(word,'%(nd|rt)@<=ex$','ice')
0 commit comments