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

Fix :R in namespaced models #518

Closed anderslemke closed 6 years ago

anderslemke commented 6 years ago

In the case of namespaced models, eg.

class Hello::World < ActiveRecord::Base
end

the current regex would not recognize it as being a descendant of ActiveRecord::Base, so hitting :R in such a model, would take you to the test/spec-file, and not, as exptected, the schema.

This PR basically reverts this line to the state prior to 01f66494cc1343b479b82b125dcaa60b5fc3cc43.

As I could not infer why the line was changed in the above commit, I'm not sure if this change breaks something else.

(And thank you, Tim, for your awesome work!)