@@ -1772,12 +1772,9 @@ endfunction
17721772
17731773function ! s: RailsIncludefind (str,... )
17741774 if a: str == # " ApplicationController"
1775- return " app /controllers/application.rb"
1775+ return " application_controller.rb \n app /controllers/application.rb"
17761776 elseif a: str == # " Test::Unit::TestCase"
17771777 return " test/unit/testcase.rb"
1778- elseif a: str == " <%="
1779- " Probably a silly idea
1780- return " action_view.rb"
17811778 endif
17821779 let str = a: str
17831780 if a: 0 == 1
@@ -1842,7 +1839,6 @@ function! s:RailsIncludefind(str,...)
18421839 endif
18431840 endwhile
18441841 elseif str = ~# ' _\%(path\|url\)$'
1845- " REST helpers
18461842 let str = s: sub (str,' _%(path|url)$' ,' ' )
18471843 let str = s: sub (str,' ^hash_for_' ,' ' )
18481844 let file = rails#app ().named_route_file (str)
@@ -2070,7 +2066,7 @@ function! s:integrationtestList(A,L,P)
20702066 let found += s: autocamelize (rails#app ().relglob (" test/integration/" ," **/*" ," _test.rb" ),a: A )
20712067 endif
20722068 if rails#app ().test_suites (' features' )
2073- let found += rails#app ().relglob (" features/" ," **/*" ," .feature" )
2069+ let found += s: completion_filter ( rails#app ().relglob (" features/" ," **/*" ," .feature" ), a: A )
20742070 endif
20752071 return found
20762072endfunction
@@ -2193,13 +2189,13 @@ function! s:CommandEdit(bang,cmd,name,prefix,suffix,filter,default,...)
21932189 endif
21942190endfunction
21952191
2196- function ! s: EditSimpleRb (bang ,cmd,name,target,prefix,suffix)
2192+ function ! s: EditSimpleRb (bang ,cmd,name,target,prefix,suffix, ... )
21972193 let cmd = s: findcmdfor (a: cmd .(a: bang ?' !' :' ' ))
21982194 if a: target == " "
21992195 " Good idea to emulate error numbers like this?
22002196 return s: error (" E471: Argument required" )
22012197 endif
2202- let f = rails#underscore (a: target )
2198+ let f = a: 0 ? a: target : rails#underscore (a: target )
22032199 let jump = matchstr (f ,' #.*\|:\d*\%(:in\)\=$' )
22042200 let f = s: sub (f ,' #.*|:\d*%(:in)=$' ,' ' )
22052201 if f == ' .'
@@ -2406,11 +2402,11 @@ function! s:apiEdit(bang,cmd,...)
24062402endfunction
24072403
24082404function ! s: stylesheetEdit (bang ,cmd,... )
2409- return s: EditSimpleRb (a: bang ,a: cmd ," stylesheet" ,a: 0 ? a: 1 : s: controller (1 )," public/stylesheets/" ," .css" )
2405+ return s: EditSimpleRb (a: bang ,a: cmd ," stylesheet" ,a: 0 ? a: 1 : s: controller (1 )," public/stylesheets/" ," .css" , 1 )
24102406endfunction
24112407
24122408function ! s: javascriptEdit (bang ,cmd,... )
2413- return s: EditSimpleRb (a: bang ,a: cmd ," javascript" ,a: 0 ? a: 1 : " application" ," public/javascripts/" ," .js" )
2409+ return s: EditSimpleRb (a: bang ,a: cmd ," javascript" ,a: 0 ? a: 1 : " application" ," public/javascripts/" ," .js" , 1 )
24142410endfunction
24152411
24162412function ! s: unittestEdit (bang ,cmd,... )
0 commit comments