Extract check for rails.vim