From 384fa57fa03bdc1bec6f624668124cfabfc407c1 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 24 Jan 2013 16:12:23 -0500 Subject: [PATCH] Fix accidental references to global app --- autoload/rails.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/rails.vim b/autoload/rails.vim index 2b3c163a..fdbe47fe 100644 --- a/autoload/rails.vim +++ b/autoload/rails.vim @@ -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 @@ -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 @@ -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