Find the right routes in rails
If you're routes have grown excessive and hard to sort through. Then you need something to help you find just the routes you need. Through your rake routes into grep to filter out the noise. Simple and sweet.
rake routes | grep 'user'
Written by Justin Herrick
Related protips
2 Responses
Or write them like: get '/path/:to/whatever', 'controllers#action', as: 'whatevah_path'
Another nice thing about it, the whatevah_path
part does not change when you cange the path itself.
over 1 year ago
·
I built http://routastic.herokuapp.com/ to help make "rake routes | grep" more interactive. Try it out!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#