Last Updated: February 25, 2016
·
1.15K
· 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