Rails Related Files
Ruby on Rails Project Navigation Made Easy
- Total 9K
- Win 1K
- Mac 5K
- Linux 3K
|Sep 21||Sep 20||Sep 19||Sep 18||Sep 17||Sep 16||Sep 15||Sep 14||Sep 13||Sep 12||Sep 11||Sep 10||Sep 9||Sep 8||Sep 7||Sep 6||Sep 5||Sep 4||Sep 3||Sep 2||Sep 1||Aug 31||Aug 30||Aug 29||Aug 28||Aug 27||Aug 26||Aug 25||Aug 24||Aug 23||Aug 22||Aug 21||Aug 20||Aug 19||Aug 18||Aug 17||Aug 16||Aug 15||Aug 14||Aug 13||Aug 12||Aug 11||Aug 10||Aug 9||Aug 8|
Sublime Text 2/3 - Rails Related Files
Note: I've never written any Python code before! So feel free to implement best practices and make a pull request.
This plugin allows you to easily navigate your Rails projects by making a few basic assumptions. I wrote this so I didnt have to constantly use the SideBar to lookup files!
Ok, so lets imagine you “right clicked” on the following file/s (Screenshot 2) or by using the “CMD+Shift+O” shortcut (Screenshot 1) it will search for files:
If it was under the “admin” namespace e.g.
app/controllers/admin/posts_controller.rb then it will look under
views/admin/posts/** and vice versa.
views/posts/** - All files under this folder models/post** - Models starting with "post"
post.rb model under
models/post** - Models starting with "post" views/posts/** - All files in this folder views/**/posts/** - All files in this folder (e.g. admin namespace) controllers/post** - Any controller starting with "post" controllers/**/post** - Any controller starting with "post" (e.g. admin namespace)
If you want to disable the context menu, just edit the
Rails.sublime-settings file changing “show_context_menu” to false.
Maybe we can extract the possible partials being used in the current file e.g.
render "post" or even
render @posts, we know where to look > app/views/posts/_post
Here I've pressed the shortcut key when looking at the “page.rb” file under models.
- https://github.com/fredwu - Fred Wu - added support for test/spec files
- https://github.com/bratsche - Cody Russell - bug fix
- https://github.com/deiga - Timo Sand - Sublime Menu Entries, Support for helper Files
- https://github.com/nahaylo - Vitaliy Nahaylo - ST3 compatibility fix