Last Updated: February 25, 2016
·
1.367K
· cutalion

Generate and save routes into a text file each time they change

  • install guard and guard-shell

  • add the following section to Guardfile:

    guard 'shell' do
      watch(/^config\/routes\.rb$/) { `bundle exec rake routes > routes.txt` }
    end
  • add routes.txt into .gitignore

  • start guard, change the routes.rb file

  • run cat routes.txt | grep something instead of rake routes

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

Guarding a web app includes the code that arrives in the browser, not only the code in source control. Tags and dependencies can change in production between deploys.

Security insights from Cside