How to Cleanup the Routes in Rails App Using ‘Traceroute’ gem

01 Sep 2017
0
Comments

How to Cleanup the Routes in Rails App Using ‘Traceroute’ gem

Code cleanup refers to the act of writing code so that it cleans up leftover data structures and other unwanted materials from memory and the file system. It is not the same as refactoring code, which involves making the source code itself easier to understand, maintain, and modify. TraceRoute is the tool helpful for code cleanup.

Integrate this gem in the Rails application by putting this gem into gem file.

Traceroute is a route cleaning tool for Rails applications. It provides a simple rake task for checking which routes are mapped to non existing controller actions, and finds out which controller actions are not reachable.

The following steps with the description implements Traceroute for code cleanup using traceroute gem in our ruby on rails application easily.

STEP 1. gem install traceroute

STEP 2. Bundle Install

STEP 3.Type rake traceroute in command prompt and press Enter. List will appears with unused routes and unreachable action methods.



Leave a comment:

Recent Blogs
Contact Us