Grep Rails Routes
This week I found a treasure inside the Hashrocket Dotmatrix; behold:
# .zshrc
alias groutes='rake routes | grep $@'
This aliases rake routes | grep [foo]
, which I frequently use to search through big Rails routes files.
It looks like the Rails core team is responding to this pattern in Rails 5:
https://github.com/rails/rails/issues/18902
In the meantime, patch it yourself and reap the benefits.
h/t Dorian Karter & Jon Allured
Tweet