Skip to content

Commit

Permalink
Fix accidental references to global app
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Jan 24, 2013
1 parent a1d1d28 commit 384fa57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autoload/rails.vim
Expand Up @@ -2997,7 +2997,7 @@ function! s:readable_open_command(cmd, argument, name, options) dict abort
endif
elseif a:argument ==# '' && type(default) == type([])
for file in default
if rails#app().has_file(file)
if self.app().has_file(file)
return cmd . ' ' . fnameescape(file)
endif
endfor
Expand All @@ -3015,7 +3015,7 @@ function! s:readable_open_command(cmd, argument, name, options) dict abort
endfor
endfor
for [prefix, suffix] in pairs
let file = rails#app().path(prefix . root . suffix)
let file = self.app().path(prefix . root . suffix)
if filereadable(file)
return cmd . ' ' . fnameescape(simplify(file)) . '|exe ' . s:sid . 'djump('.string(djump) . ')'
endif
Expand All @@ -3024,8 +3024,8 @@ function! s:readable_open_command(cmd, argument, name, options) dict abort
return 'echoerr '.string('No such '.a:name.' '.a:argument)
endif
for [prefix, suffix] in pairs
if isdirectory(rails#app().path(prefix))
let file = rails#app().path(prefix . root . suffix)
if isdirectory(self.app().path(prefix))
let file = self.app().path(prefix . root . suffix)
if !isdirectory(fnamemodify(file, ':h'))
call mkdir(fnamemodify(file, ':h'), 'p')
endif
Expand Down

0 comments on commit 384fa57

Please sign in to comment.