@@ -2095,6 +2095,7 @@ function! s:BufFinderCommands()
20952095 call s: addfilecmds (" model" )
20962096 call s: addfilecmds (" view" )
20972097 call s: addfilecmds (" controller" )
2098+ call s: addfilecmds (" mailer" )
20982099 call s: addfilecmds (" migration" )
20992100 call s: addfilecmds (" observer" )
21002101 call s: addfilecmds (" helper" )
@@ -2181,6 +2182,10 @@ function! s:controllerList(A,L,P)
21812182 return s: autocamelize (con ,a: A )
21822183endfunction
21832184
2185+ function ! s: mailerList (A,L,P )
2186+ return s: autocamelize (rails#app ().relglob (" app/mailers/" ," **/*" ," .rb" ),a: A )
2187+ endfunction
2188+
21842189function ! s: viewList (A,L,P )
21852190 let c = s: controller (1 )
21862191 let top = rails#app ().relglob (" app/views/" ,s: fuzzyglob (a: A ))
@@ -2616,6 +2621,10 @@ function! s:controllerEdit(cmd,...)
26162621 return s: EditSimpleRb (a: cmd ," controller" ,controller," app/controllers/" ,suffix)
26172622endfunction
26182623
2624+ function ! s: mailerEdit (cmd,... )
2625+ return s: EditSimpleRb (a: cmd ," mailer" ,a: 0 ? a: 1 : s: controller (1 )," app/mailers/\n app/models/" ," .rb" )
2626+ endfunction
2627+
26192628function ! s: helperEdit (cmd,... )
26202629 return s: EditSimpleRb (a: cmd ," helper" ,a: 0 ? a: 1 : s: controller (1 )," app/helpers/" ," _helper.rb" )
26212630endfunction
0 commit comments