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.
2 parents a8a4a10 + 48b1d50 commit 254f5cfCopy full SHA for 254f5cf
autoload/rails.vim
@@ -329,6 +329,8 @@ function! s:model(...)
329
return rails#singularize(s:sub(f,'.*<%(test|spec)/fixtures/(.*)\.\w*\~=$','\1'))
330
elseif f =~ '\<\%(test\|spec\)/exemplars/.*_exemplar\.rb$'
331
return s:sub(f,'.*<%(test|spec)/exemplars/(.*)_exemplar\.rb$','\1')
332
+ elseif f =~ '\<\%(test\|spec\)/factories/.*\.rb$'
333
+ return s:sub(f,'.*<%(test|spec)/factories/(.{-})%(_factory)=\.rb$','\1')
334
elseif a:0 && a:1
335
return rails#singularize(s:controller())
336
endif
0 commit comments