tpope / vim-rails

rails.vim: Ruby on Rails power tools
http://www.vim.org/scripts/script.php?script_id=1567
4.1k stars 383 forks source link

'gf' throw "E730: defng List as a String" in controller jump to view #523

Closed caitlingao closed 6 years ago

caitlingao commented 6 years ago

vim version VIM - Vi IMproved 8.1 (2018 May 18, compiled Aug 7 2018 21:58:18) macOS High Sierra

controller file

module Api::V1
  class BookingsController < BaseController
     def index
        @bookings = Booking.all
      end
  end
end

Cursor before def, use command gf jump to index view gives this error

:find
Error detected while processing function rails#ruby_cfile[1]..<SNR>88_find[2]..<SNR>88_sub:
line    1:
E730: defng List as a String
:find def

But the controller file

class BookingsController < BaseController
  def index
    @bookings = Booking.all
  end
end

gf command jump to index view do well.