Rails Related Files
Ruby on Rails Project Navigation Made Easy
Details
Installs
- Total 9K
- Win 1K
- Mac 5K
- Linux 3K
Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
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:
posts_controller.rb
under app/controllers
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"
show.html.erb
under app/views/posts
models/post** - Models starting with "post"
views/posts/** - All files in this folder
assets/javascript/post** - Any javascript file starting with "post"
assets/stylesheets/post** - Any stylesheet file starting with "post"
controllers/post** - Any controller file starting with "post"
post.rb
model under app/models
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.
Future
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
Screenshots
Here I've pressed the shortcut key when looking at the “page.rb” file under models.
Quick Panel
Context Menu
Contributors
- 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
Credits
- Python version of Rails Inflector https://bitbucket.org/ixmatus/inflector
- Tiny copy/paste from https://github.com/kemayo/sublime-text-2-git