@@ -1936,10 +1936,10 @@ function! s:RailsFind()
1936
1936
let res = s: findasymbol (' template' ,' app/views/\1' )
1937
1937
if res != " " |return res |endif
1938
1938
1939
- let res = s: sub (s: sub (s: findasymbol (' partial' ,' \1' ),' ^/' ,' ' ),' \k +$' ,' _&' )
1939
+ let res = s: sub (s: sub (s: findasymbol (' partial' ,' \1' ),' ^/' ,' ' ),' [^/] +$' ,' _&' )
1940
1940
if res != " " |return res ." \n " .s: findview (res )|endif
1941
1941
1942
- let res = s: sub (s: sub (s: findfromview (' render\s*(\=\s*\%(:partial\s\+=>\|partial:\)\s*' ,' \1' ),' ^/' ,' ' ),' \k +$' ,' _&' )
1942
+ let res = s: sub (s: sub (s: findfromview (' render\s*(\=\s*\%(:partial\s\+=>\|partial:\)\s*' ,' \1' ),' ^/' ,' ' ),' [^/] +$' ,' _&' )
1943
1943
if res != " " |return res ." \n " .s: findview (res )|endif
1944
1944
1945
1945
let res = s: findamethod (' render\>\s*\%(:\%(template\|action\)\s\+=>\|template:\|action:\)\s*' ,' \1.' .format.' \n\1' )
@@ -2044,7 +2044,7 @@ function! s:RailsIncludefind(str,...)
2044
2044
" Classes should always be in .rb files
2045
2045
let str .= ' .rb'
2046
2046
elseif line = ~# ' :partial\s*=>\s*'
2047
- let str = s: sub (str,' ( [^/]+) $' ,' _\1 ' )
2047
+ let str = s: sub (str,' [^/]+$' ,' _& ' )
2048
2048
let str = s: findview (str)
2049
2049
elseif line = ~# ' \<layout\s*(\=\s*' || line = ~# ' :layout\s*=>\s*'
2050
2050
let str = s: findview (s: sub (str,' ^/=' ,' layouts/' ))
0 commit comments