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 a610e6b commit 2bed02cCopy full SHA for 2bed02c
autoload/rails.vim
@@ -570,7 +570,7 @@ function! rails#singularize(word)
570
" Probably not worth it to be as comprehensive as Rails but we can
571
" still hit the common cases.
572
let word = a:word
573
- let last_word = split(s:sub(word, '^:', ''),"_")[-1]
+ let last_word = reverse(split(s:sub(word, '^:', ''), "_"))[0]
574
if word =~? '\.js$' || word == ''
575
return word
576
elseif has_key(g:rails_custom_singularize, last_word)
0 commit comments